From: Vance K. <va...@us...> - 2007-12-04 14:09:38
|
User: vancek Date: 07/12/04 06:09:42 Modified: andromda-ejb3/src/site changes.xml andromda-ejb3/src/main/resources/templates/ejb3 DaoBase.vsl Log: ejb-71 - fixed getter calls in transformer of base daos when an entity has a composite pk Revision Changes Path 1.31 +4 -0 cartridges/andromda-ejb3/src/site/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/site/changes.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -u -w -r1.30 -r1.31 --- changes.xml 30 Nov 2007 12:14:31 -0000 1.30 +++ changes.xml 4 Dec 2007 14:09:42 -0000 1.31 @@ -545,6 +545,10 @@ patched; such that we still require to model the Entity stereotype as well as the MappedSuperclass stereotype on all mapped superclasses. </action> + <action dev="vancek" due-to="luca.dallolio" type="fix"> + JIRA EJB-71 - When modeling a ValueObject based on an entity that has a composite PK, the transformer to + the VO does not call the getters on the embeddable class, which throws an exception during compilation. + </action> </release> </body> </document> \ No newline at end of file 1.13 +5 -1 cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoBase.vsl Index: DaoBase.vsl =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/resources/templates/ejb3/DaoBase.vsl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- DaoBase.vsl 24 Jan 2007 04:37:55 -0000 1.12 +++ DaoBase.vsl 4 Dec 2007 14:09:42 -0000 1.13 @@ -861,7 +861,11 @@ #* *##foreach ($entityProperty in $entityProperties) #* *##if ($property.name.equals($entityProperty.name)) #* *##set ($entityPropertyGetterValue = false) +#* *##if ($entity.compositePrimaryKeyPresent) +#* *##set ($entityPropertyGetterValue = $converter.typeConvert($entityProperty.type.fullyQualifiedName, "source.getPk().${entityProperty.getterName}()", $property.type.fullyQualifiedName)) +#* *##else #* *##set ($entityPropertyGetterValue = $converter.typeConvert($entityProperty.type.fullyQualifiedName, "source.${entityProperty.getterName}()", $property.type.fullyQualifiedName)) +#* *##end #* *##if ($entityPropertyGetterValue) target.${property.setterName}($entityPropertyGetterValue); #* *##else |