db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1237917 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm
Date Mon, 30 Jan 2012 18:36:27 GMT
Author: tfischer
Date: Mon Jan 30 18:36:27 2012
New Revision: 1237917

URL: http://svn.apache.org/viewvc?rev=1237917&view=rev
Log:
TORQUE-107 prevent NullPointerException in getter for referenced objects

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm?rev=1237917&r1=1237916&r2=1237917&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getterReferencingObject.vm
Mon Jan 30 18:36:27 2012
@@ -135,7 +135,8 @@
                 criteria.add(${otherTablePeerName}.${otherTablePeerColumnName}, ${thisTableColumnGetter}()
);
 #end
 #if ($objectIsCaching)
-                if (!${criteriaCacheField}.equals(criteria))
+                if (${criteriaCacheField} == null 
+                        || !${criteriaCacheField}.equals(criteria))
                 {
                     $field = ${otherTablePeerName}.doSelect(criteria);
                 }



---------------------------------------------------------------------
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