From: Vance K. <va...@us...> - 2006-06-17 03:51:05
|
User: vancek Date: 06/06/16 20:51:02 Modified: andromda-ejb3/src/changes changes.xml andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl Log: DiscriminatorValue annotation should not be rendered on subclasses where the super entity is an mapped superclass Revision Changes Path 1.7 +5 -0 cartridges/andromda-ejb3/src/changes/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/changes/changes.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -r1.6 -r1.7 --- changes.xml 14 Jun 2006 14:37:25 -0000 1.6 +++ changes.xml 17 Jun 2006 03:51:02 -0000 1.7 @@ -100,6 +100,11 @@ <action dev="vancek" due-to="tlu" type="update"> Generate documentation for enumeration literals. </action> + <action dev="vancek" type="fix"> + Inheritance hierarchies where the super class is a mapped superclass, the subclass should not + render the DiscriminatorValue annotation. This annotation should only be rendered in subclasses of + single table inheritance hierarchies. + </action> </release> </body> </document> \ No newline at end of file 1.32 +1 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl Index: EntityEmbeddable.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/EntityEmbeddable.vsl,v retrieving revision 1.31 retrieving revision 1.32 diff -u -w -r1.31 -r1.32 --- EntityEmbeddable.vsl 14 Jun 2006 04:55:20 -0000 1.31 +++ EntityEmbeddable.vsl 17 Jun 2006 03:51:02 -0000 1.32 @@ -75,7 +75,7 @@ @javax.persistence.DiscriminatorColumn(#if ($entity.discriminatorColumn)name = "${entity.discriminatorColumn}"#set ($argExists = true)#end#if ($entity.discriminatorType)#if ($argExists), #end#**#discriminatorType = javax.persistence.DiscriminatorType.${entity.discriminatorType}#set ($argExists = true)#end#if ($entity.discriminatorColumnDefinition)#if ($argExists), #end#**#columnDefinition = "${entity.discriminatorColumnDefinition}"#set ($argExists = true)#end#if ($entity.discriminatorLength > 0)#if ($argExists), #end#**#length = ${entity.discriminatorLength}#end) @javax.persistence.DiscriminatorValue("${entity.discriminatorValue}") #* *##end -#**##elseif ($entity.requiresGeneralizationMapping && $entity.inheritanceSingleTable) +#**##elseif ($entity.requiresGeneralizationMapping && $entity.inheritanceSingleTable && !$entity.embeddableSuperclassGeneralizationExists) ## ## Only include the DiscriminatorValue annotation for subclasses if ## the inheritance strategy is single table mapping strategy. |