Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-2855

service builder builds <entity>Clp class incorrectly when <entity>Impl overrides a method in <entity>ModelImpl

    Details

      Description

      When using <entity>Impl to override a method in <entity>ModelImpl, service builder adds another method with the same method signature to <entity>Clp so the compilation fails.

      Here's an example ... let's say the entity has a member field called "name" of type String.

      In <entity>ModelImpl, obviously, it will have this method:

      public void setName(String name) {
      ...
      }

      if in your <entity>Impl, you want to override the method ...

      public void setName(String name) {
      super.setName();
      //custom logic
      }

      you rerun service builder, and you'll get a build failure because of compilation error.

      The <entity>Clp class has this:

      public void setName(String name) {
      _name = name;
      }

      public void setName(String name) {
      throw new UnsupportedOperationException();
      }

      This second method shouldn't be generated.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.saechang Michael Saechang
              Reporter:
              wilson.man Wilson Man
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 4 weeks, 2 days ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2