I am trying to persist data using Hibernate and which includes a timestamp field with milliseconds upto length 6.
I want to persist [b]yyyy-MM-dd HH:mm:ss:SSSSSS[/b] format, my input string is [b]2008-11-15-09.31.16.469000[/b].
But after hibernate persistance in the database the field seems to looses milliseconds and only posts it as 2008-11-15-09.31.16.000000.
The HBM mapping file is already mapped to java.sql.Timestamp as
<property name="myTimeStampField" type="java.sql.Timestamp">
<column name="MY_TIME_COL" length="7" not-null="true" />
</property>
I tried to run a update in Oracle 9i with this date format and value, Oracle can update the values if I run it as a seperate querry in Oracle console.
Hibernate is not able to persist the value with the timestamps.
I think this is a known issue with Hibernate, any thoughts how i can persist the milliseconds in the MY_TIME_COL ?
My Oracle Table has the MY_TIME_COL as TIMESTAMP(6) type and length, so it can update and store timestamps.
Any help most appreceated.
|