Hi,
I've got a Hibernate object mapping to a table on an Oracle 8 (I know, I know) database, and I'm having trouble writing to a date field on it.
Code:
LAST_UPDATED DATE DEFAULT sysdate NOT NULL ENABLE
NA_CUT_OFF_TIME DATE
The Hibernate mapping then has ...
Code:
<property name="lastUpdated" type="date">
<column name="LAST_UPDATED" length="7" not-null="true" />
</property>
<property name="naCutoffTime" type="date">
<column name="NA_CUT_OFF_TIME" length="7" />
</property>
I then keep getting org.hibernate.exception.GenericJDBCException when trying to write to the cut off time. The stack trace give me ...
Caused by: java.sql.SQLException: ORA-03115: unsupported network datatype or representation
And ...
WARNING: data exception thrown: Hibernate operation: could not update: [com.MyClass#12345678912345670]; uncategorized SQLException for SQL [update T_MY_TABLE set NA_CUT_OFF_TIME=? where TOKEN=?]; SQL state [63000]; error code [3115]; ORA-03115: unsupported network datatype or representation
Any ideas? I'm stumped! Hibernate generates a java.util.Date in the VO, I've made sure it's not using a java.util.Timestamp when it writes back, knowing that milliseconds weren't supported for the Oracle DATE type until Oracle 9.
Help!