Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1631

jdoqlFromClause validation error with multi-level inheritance

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.14.0
    • Fix Version/s: 1.15.0
    • Component/s: Core
    • Labels:
      None

      Description

      1) I have 3 domain objects with multi-level inheritance (in the same package): A, B, C

      @DomainObject(objectType = "A", editing = Editing.ENABLED)
      public abstract class A
      
      @DomainObject(objectType = "B", editing = Editing.ENABLED)
      public class B extends A
      
      @DomainObject(objectType = "C", editing = Editing.ENABLED)
      public class C extends B
      

      2) class A has the following JDOQL query:

      @Queries({
              @Query(
                      name = "getById",
                      value = "SELECT "
                              + "FROM com.home.test.A "
                              + "WHERE id == :id")
            })
      

      3) When I turned on the validation:

      isis.reflector.validator.jdoqlFromClause=true
      

      I've got the error:

      java.lang.AssertionError: Metamodel is invalid: 
      com.home.test.C: error in JDOQL query, class name after FROM clause should be same as class name on which annotated, or one of its supertypes (JDOQL : SELECT FROM com.home.test.A WHERE id == :id)
      

      4)If I make one-level inheritance:

      @DomainObject(objectType = "A", editing = Editing.ENABLED)
      public abstract class A
      
      @DomainObject(objectType = "B", editing = Editing.ENABLED)
      public class B extends A
      
      @DomainObject(objectType = "C", editing = Editing.ENABLED)
      public class C extends A
      

      The validation passes OK.

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 4271a0c18205bc427a0bda42938aaa947dbfd723 in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=4271a0c ]

        ISIS-1631: validator now checks all subclasses transitively, rather than just the direct subclasses

        Show
        jira-bot ASF subversion and git services added a comment - Commit 4271a0c18205bc427a0bda42938aaa947dbfd723 in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=4271a0c ] ISIS-1631 : validator now checks all subclasses transitively, rather than just the direct subclasses

          People

          • Assignee:
            danhaywood Dan Haywood
            Reporter:
            sergeys Sergey Sverdlov
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development