db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1411561 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/fillReferencedObject.vm
Date Tue, 20 Nov 2012 06:32:17 GMT
Author: tfischer
Date: Tue Nov 20 06:32:17 2012
New Revision: 1411561

URL: http://svn.apache.org/viewvc?rev=1411561&view=rev
Log:
TORQUE-248 fix filler methods for nulled composite foreign keys

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/fillReferencedObject.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/fillReferencedObject.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/fillReferencedObject.vm?rev=1411561&r1=1411560&r2=1411561&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/fillReferencedObject.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/fillReferencedObject.vm
Tue Nov 20 06:32:17 2012
@@ -242,7 +242,17 @@
         for (${localDbObjectClassName} objectToFill : toFill)
         {
             ObjectKey foreignKey = objectToFill.${foreignKeyGetter}();
+#if ($foreignKeyReferences.size() == 1)
             if (foreignKey == null || foreignKey.getValue() == null)
+#else
+            if (foreignKey == null || foreignKey.getValue() == null || (
+  #set ($i = 0)
+  #foreach ($referenceElement in $foreignKeyReferences)
+    #if ($i > 0)                 &&#else                   #end ((SimpleKey[])foreignKey.getValue())[$i].getValue()
== null
+    #set ($i = $i + 1)
+  #end
+                ))
+#end
             {
                 continue;
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message