You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/07/31 14:11:00 UTC
[jira] [Commented] (ISIS-1631) jdoqlFromClause validation error
with multi-level inheritance
[ https://issues.apache.org/jira/browse/ISIS-1631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16107350#comment-16107350 ]
ASF subversion and git services commented on ISIS-1631:
-------------------------------------------------------
Commit 4271a0c18205bc427a0bda42938aaa947dbfd723 in isis's branch refs/heads/master from [~danhaywood]
[ 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
> jdoqlFromClause validation error with multi-level inheritance
> -------------------------------------------------------------
>
> Key: ISIS-1631
> URL: https://issues.apache.org/jira/browse/ISIS-1631
> Project: Isis
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.14.0
> Reporter: Sergey Sverdlov
> Assignee: Dan Haywood
> Fix For: 1.15.0
>
>
> 1) I have 3 domain objects with *multi-level* inheritance (in the same package): A, B, C
> {code}
> @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
> {code}
> 2) class A has the following JDOQL query:
> {code}
> @Queries({
> @Query(
> name = "getById",
> value = "SELECT "
> + "FROM com.home.test.A "
> + "WHERE id == :id")
> })
> {code}
> 3) When I turned on the validation:
> {code}
> isis.reflector.validator.jdoqlFromClause=true
> {code}
> I've got the error:
> {code}
> 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)
> {code}
> 4)If I make *one-level* inheritance:
> {code}
> @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
> {code}
> The validation passes OK.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)