db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r987557 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm
Date Fri, 20 Aug 2010 15:50:09 GMT
Author: tfischer
Date: Fri Aug 20 15:50:09 2010
New Revision: 987557

URL: http://svn.apache.org/viewvc?rev=987557&view=rev
Log:
Fix compile errors for object composite keys

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

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm?rev=987557&r1=987556&r2=987557&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm
Fri Aug 20 15:50:09 2010
@@ -138,7 +138,12 @@
       #if ($primitive == "true")
         ${setter}(((NumberKey) keys[$i]).${fieldType}Value());
       #else
-        ${setter}(new ${fieldType}((NumberKey) keys[$i]).${fieldType}Value());
+        #if ($fieldType == "Integer")
+          #set ( $valueMethod = "intValue")
+        #else
+          #set ( $valueMethod = "${fieldType.substring(0,1).toLowerCase()}${fieldType.substring(1)}Value"
)
+        #end
+        ${setter}(new ${fieldType}(((NumberKey) keys[$i]).${valueMethod}()));
       #end
     #elseif($fieldType == "String")
         ${setter}(keys[$i].toString());



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