The attached patch adds Short to the if-elseif chain of rec.setValue()
statements in the insertOrUpdateRecord method of BasePeer.java

I ran into this while trying to save (insert) an object containing a
Short.  I haven't tried an update yet.

-james

-- 
[]  James A. Hillyerd <[EMAIL PROTECTED]> - Java Software Engineer
[]  PGP 1024D/D31BC40D F87B 7906 C0DA 32E8 B8F6 DE23 FBF6 4712 D31B C40D
Index: BasePeer.java
===================================================================
RCS file: /home/cvspublic/jakarta-turbine-torque/src/java/org/apache/torque/util/BasePeer.java,v
retrieving revision 1.34
diff -u -r1.34 BasePeer.java
--- BasePeer.java	18 Mar 2002 07:59:02 -0000	1.34
+++ BasePeer.java	11 Apr 2002 03:26:44 -0000
@@ -1024,6 +1024,11 @@
                         rec.setValue( colMap.getColumnName(),
                                       criteria.getLong(key) );
                     }
+                    else if ( obj instanceof Short)
+                    {
+                        rec.setValue( colMap.getColumnName(),
+                                      ((Short) obj).shortValue() );
+                    }
                     else if ( obj instanceof Hashtable )
                     {
                         rec.setValue( colMap.getColumnName(),

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to