Grails
  1. Grails
  2. GRAILS-6662

Domain classes cannot extend class in src/java

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.3.3, 1.3.4
    • Fix Version/s: 1.3.5
    • Component/s: Persistence
    • Labels:
      None

      Description

      Much like GRAILS-6405, you can't extend an abstract class in src/java:
      Put this in grails-app/domain:

      class User extends AbstractDomain {
      String name
      }
      and this in src/java:
      public abstract class AbstractDomain {
      }

      and User isn't recognized as a domain class.

      It was working as of grails-1.3.0.

        Issue Links

          Activity

          Hide
          Jeff Scott Brown added a comment -

          Attaching a 1.3.4 application in which it appears that this is working as designed. If you can provide an example that demonstrates the problem, that would be helpful.

          Thanks.

          Show
          Jeff Scott Brown added a comment - Attaching a 1.3.4 application in which it appears that this is working as designed. If you can provide an example that demonstrates the problem, that would be helpful. Thanks.
          Hide
          Jeff Scott Brown added a comment -

          Apologies. As soon as I uploaded that I realized that the source file under src/java is actually Groovy source file, not a Java source file. I can reproduce the problem with a Java source file. Will get it fixed.

          Thanks for your help.

          Show
          Jeff Scott Brown added a comment - Apologies. As soon as I uploaded that I realized that the source file under src/java is actually Groovy source file, not a Java source file. I can reproduce the problem with a Java source file. Will get it fixed. Thanks for your help.
          Hide
          Alisdair Feint added a comment -

          I am experiencing this problem but for abstract groovy classes (as per the linked issue GRAILS-6405). It was working in Grails 1.3.1, but stopped working when I upgraded to 1.3.4! Should I create another issue for this, or will this be fixed as part this issue?

          Show
          Alisdair Feint added a comment - I am experiencing this problem but for abstract groovy classes (as per the linked issue GRAILS-6405 ). It was working in Grails 1.3.1, but stopped working when I upgraded to 1.3.4! Should I create another issue for this, or will this be fixed as part this issue?
          Hide
          Jeff Scott Brown added a comment -

          Alisdair,

          No need to create another issue. We will have a fix for this committed soon. Thanks for the help.

          Show
          Jeff Scott Brown added a comment - Alisdair, No need to create another issue. We will have a fix for this committed soon. Thanks for the help.
          Show
          Jeff Scott Brown added a comment - Note that there is a relevant test at http://github.com/grails/grails-core/commit/d438a670e9fbbe0e66a9ddee47a7eb760aa498da which was subsequently reverted with http://github.com/grails/grails-core/commit/595320a114c015341792f4af90e47c7288834789
          Show
          Graeme Rocher added a comment - Fixed: http://github.com/grails/grails-core/commit/e38dfbe03532dc97a52c5c8b515a26768ad9fec8

            People

            • Assignee:
              Graeme Rocher
              Reporter:
              felipe silva
            • Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development