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-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org