mirror of https://github.com/apache/openjpa.git
OPENJPA-2305: Restore the inheritance hierarchy of the generated canonical metamodel to that of the domain model due to spec compliance, but flatten the attributes so that an inherited attribute uses generic parameter of owning class type instead of the declared supertype
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1451369 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
326fcd7a4c
commit
ecd1246c80
|
@ -240,6 +240,10 @@ public class AnnotationProcessor6 extends AbstractProcessor {
|
||||||
SourceCode.Class modelClass = source.getTopLevelClass();
|
SourceCode.Class modelClass = source.getTopLevelClass();
|
||||||
Set<Element> members = handler.getPersistentMembers(e);
|
Set<Element> members = handler.getPersistentMembers(e);
|
||||||
TypeElement supCls = handler.getPersistentSupertype(e);
|
TypeElement supCls = handler.getPersistentSupertype(e);
|
||||||
|
if (supCls != null) {
|
||||||
|
String superName = factory.getMetaModelClassName(supCls.toString());
|
||||||
|
source.getTopLevelClass().setSuper(superName);
|
||||||
|
}
|
||||||
while (supCls != null) {
|
while (supCls != null) {
|
||||||
members.addAll(handler.getPersistentMembers(supCls));
|
members.addAll(handler.getPersistentMembers(supCls));
|
||||||
supCls = handler.getPersistentSupertype(supCls);
|
supCls = handler.getPersistentSupertype(supCls);
|
||||||
|
|
Loading…
Reference in New Issue