我刚刚在我的项目中将 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) 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 验证。
谢谢!