From ecd1246c80d3105ccb39ad3682e180e6d646d61d Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Thu, 28 Feb 2013 21:46:54 +0000 Subject: [PATCH] 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 --- .../apache/openjpa/persistence/meta/AnnotationProcessor6.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java index 91a20fa20..c4d099630 100644 --- a/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java +++ b/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java @@ -240,6 +240,10 @@ public class AnnotationProcessor6 extends AbstractProcessor { SourceCode.Class modelClass = source.getTopLevelClass(); Set members = handler.getPersistentMembers(e); TypeElement supCls = handler.getPersistentSupertype(e); + if (supCls != null) { + String superName = factory.getMetaModelClassName(supCls.toString()); + source.getTopLevelClass().setSuper(superName); + } while (supCls != null) { members.addAll(handler.getPersistentMembers(supCls)); supCls = handler.getPersistentSupertype(supCls);