You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pp...@apache.org on 2013/02/28 22:46:55 UTC

svn commit: r1451369 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java

Author: ppoddar
Date: Thu Feb 28 21:46:54 2013
New Revision: 1451369

URL: http://svn.apache.org/r1451369
Log:
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

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java?rev=1451369&r1=1451368&r2=1451369&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java (original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/AnnotationProcessor6.java Thu Feb 28 21:46:54 2013
@@ -240,6 +240,10 @@ public class AnnotationProcessor6 extend
             SourceCode.Class modelClass = source.getTopLevelClass();
             Set<Element> 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);