db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1070072 - /db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/recordmapper/dbObjectFieldGetter.vm
Date Sat, 12 Feb 2011 13:04:08 GMT
Author: tfischer
Date: Sat Feb 12 13:04:07 2011
New Revision: 1070072

URL: http://svn.apache.org/viewvc?rev=1070072&view=rev
Log:
fix null handling for number objects

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

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/recordmapper/dbObjectFieldGetter.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/recordmapper/dbObjectFieldGetter.vm?rev=1070072&r1=1070071&r2=1070072&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/recordmapper/dbObjectFieldGetter.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/peer/base/recordmapper/dbObjectFieldGetter.vm
Sat Feb 12 13:04:07 2011
@@ -69,7 +69,16 @@
                     return false;
                 }
 #else
+  #if ($primitive == "true" || $fieldType == "String")
                 return resultSet.${resultSetGetter}(columnIndex);
+  #else
+                ${fieldType} value = resultSet.${resultSetGetter}(columnIndex);
+                if (resultSet.wasNull())
+                {
+                    value = null;
+                }
+                return value;
+  #end
 #end
             }
             catch (SQLException e)



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