From: Vance K. <va...@us...> - 2006-01-28 02:44:06
|
User: vancek Date: 06/01/27 18:43:59 Modified: andromda-ejb3/src/main/resources/templates/ejb3 EntityEmbeddable.vsl Log: only add optional element of OneToOne annotation on the owning side of the association Revision Changes Path 1.9 +3 -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.8 retrieving revision 1.9 diff -u -w -r1.8 -r1.9 --- EntityEmbeddable.vsl 26 Jan 2006 06:58:43 -0000 1.8 +++ EntityEmbeddable.vsl 28 Jan 2006 02:43:59 -0000 1.9 @@ -329,6 +329,7 @@ ## MANY TO ONE RELATIONSHIP ## ## Default fetch type: EAGER +## Has optional feature ## /** * Get the ${target.name} @@ -397,6 +398,7 @@ ## ONE TO ONE RELATIONSHIP ## ## Default fetch type: EAGER +## Add the optional feature on the owning side of a One-to-One relationship ## /** * Get the ${target.name} @@ -404,7 +406,7 @@ * @return $target.getterSetterTypeName */ #* *##set ($argExists = false) - @javax.persistence.OneToOne(#if (!$target.optional)optional = false#set ($argExists = true)#end#if ($target.cascadeType)#if ($argExists), #end#**#cascade = {${target.cascadeType}}#set ($argExists = true)#end#if(!$associationEnd.owning)#if ($argExists), #end#**#mappedBy = "${associationEnd.name}"#set ($argExists = true)#end#if ($target.lazy)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.LAZY#end) + @javax.persistence.OneToOne(#if($associationEnd.owning)#if (!$target.optional)optional = false#set ($argExists = true)#end#end#if ($target.cascadeType)#if ($argExists), #end#**#cascade = {${target.cascadeType}}#set ($argExists = true)#end#if(!$associationEnd.owning)#if ($argExists), #end#**#mappedBy = "${associationEnd.name}"#set ($argExists = true)#end#if ($target.lazy)#if ($argExists), #end#**#fetch = javax.persistence.FetchType.LAZY#end) #* *##if($associationEnd.owning) @javax.persistence.JoinColumn(name = "$stringUtils.upperCase(${target.name})"#if ($associationEnd.columnDefinition), columnDefinition = "${associationEnd.columnDefinition}"#end) #* *##end |