具有多级继承的 Apache Isis jdoqlFromClause 验证错误
Apache Isis jdoqlFromClause validation error with multi-level inheritance
我刚刚在我的项目中将 Apache Isis 升级到最新版本 1.14.0 并面临下一个问题:
1) 我有 3 个具有 多级 继承的域对象(在同一个包中):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 有以下 JDOQL 查询:
@Queries({
@Query(
name = "getById",
value = "SELECT "
+ "FROM com.home.test.A "
+ "WHERE id == :id")
})
3) 当我打开验证时:
isis.reflector.validator.jdoqlFromClause=true
我遇到了错误:
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)如果我做一级继承:
@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
验证通过OK。
请帮助通过多级继承的 jdoqlFromClause 验证。
谢谢!
嗯,所以,这个我觉得有待改进。感谢您写这篇文章。
你能在我们的 JIRA 上提出一个缺陷吗?
谢谢
旦
我刚刚在我的项目中将 Apache Isis 升级到最新版本 1.14.0 并面临下一个问题:
1) 我有 3 个具有 多级 继承的域对象(在同一个包中):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 有以下 JDOQL 查询:
@Queries({
@Query(
name = "getById",
value = "SELECT "
+ "FROM com.home.test.A "
+ "WHERE id == :id")
})
3) 当我打开验证时:
isis.reflector.validator.jdoqlFromClause=true
我遇到了错误:
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)如果我做一级继承:
@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
验证通过OK。
请帮助通过多级继承的 jdoqlFromClause 验证。
谢谢!
嗯,所以,这个我觉得有待改进。感谢您写这篇文章。
你能在我们的 JIRA 上提出一个缺陷吗?
谢谢 旦