db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1138164 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/buildColumnValues.vm
Date Tue, 21 Jun 2011 20:21:38 GMT
Author: tfischer
Date: Tue Jun 21 20:21:38 2011
New Revision: 1138164

URL: http://svn.apache.org/viewvc?rev=1138164&view=rev
Log:
Fix: BuildColumnValues was not generated correctly for primitive column types

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

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/buildColumnValues.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/buildColumnValues.vm?rev=1138164&r1=1138163&r2=1138164&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/buildColumnValues.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/impl/base/buildColumnValues.vm
Tue Jun 21 20:21:38 2011
@@ -28,7 +28,10 @@
 ## as velocity variables.  
 ##
     /** 
-     * Returns the contents of the object as ColumnValues object
+     * Returns the contents of the object as ColumnValues object.
+     * Primary key columns which are generated on insertion are not
+     * added to the returned object if they still have their initial
+     * value.
      *
      * @throws TorqueException if the table map cannot be retrieved
      *         (should not happen).
@@ -45,11 +48,11 @@
   #set ( $columnSchemaType = $columnElement.getAttribute("schemaType") )
   #set ( $columnFieldName = $columnElement.getAttribute("field") )
   #set ( $columnFieldType = $columnElement.getAttribute("fieldType") )
-  #set ( $javaType = $columnElement.getAttribute("javaType") )
+  #set ( $primitive = $columnElement.getAttribute("primitive") )
   #if ($primaryKey && !$idMethod.equals("none"))
     #if ("boolean" == $columnFieldType)
         if (!${field}.isNew())
-    #elseif ("primitive" == $javaType)
+    #elseif ("true" == $primitive)
         if (!${field}.isNew() || ${field}.$getter() != 0)
     #else
         if (!${field}.isNew() || ${field}.$getter() != null)



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