I use Oracle DB ,if I set the Date type filed, the value of primary key( number(8)) changed, if not set the value of the Date type field, it worsk
fine ,can any body help me ?
Test test=new Test(2);
test.setIntegerField(new Integer(2)) ;
test.setNumberField(new Float(2.2)) ;
// if add the following code ,the record can insert to DB and the value of date field is correct ,but the Primary key changed
test.setDateField( new java.util.Date()) ; // if not add the code, it works fine and the value of primary key is correct
in xml file the map type is timestamp
the result in db is :
SQL> select id,integer_field ,number_field,date_field from t_test;
ID INTEGER_FIELD NUMBER_FIELD DATE_FIELD
---------- ------------- ------------ ----------
2 2 2.2
4.6000E-53 2 2.2 12-10月-04
|