r2043 - trunk/topia-persistence/src/main/java/org/nuiton/topia/generator
Author: fdesbois Date: 2010-06-28 19:19:16 +0200 (Mon, 28 Jun 2010) New Revision: 2043 Url: http://nuiton.org/repositories/revision/topia/2043 Log: Do not generate some code for association class case Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java 2010-06-28 08:06:10 UTC (rev 2042) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/EntityTransformer.java 2010-06-28 17:19:16 UTC (rev 2043) @@ -695,8 +695,8 @@ <%=attrName%>.set<%=reverseAttrName%>(this); }*/ ); - // WARN-fdesbois-2010-06-25 : in previous code no else for association class - } else { + // Don't manage reverse attribute add if attribute has associationClass + } else if (!attribute.hasAssociationClass()) { body.append("" /*{ if (<%=attrName%>.get<%=reverseAttrName%>() == null) { @@ -838,8 +838,8 @@ <%=attrName%>.set<%=reverseAttrName%>(null); }*/ ); - // WARN-fdesbois-2010-06-25 : in previous code no else for association class - } else { + // Don't manage reverse attribute remove if attribute has associationClass + } else if (!attribute.hasAssociationClass()) { body.append("" /*{ <%=attrName%>.get<%=reverseAttrName%>().remove(this); @@ -903,8 +903,8 @@ /*{ item.set<%=reverseAttrName%>(null); }*/ ); - // WARN-fdesbois-2010-06-25 : in previous code no else for association class - } else { + // Don't manage reverse attribute remove if attribute has associationClass + } else if (!attribute.hasAssociationClass()) { body.append("" /*{ item.get<%=reverseAttrName%>().remove(this); }*/
participants (1)
-
fdesbois@users.nuiton.org