3.0:
My java class has a field defined as java.sql.Timestamp and my database (oracle 9i) has column type as TIMESTAMP(6). My mapping file contains the type as timestamp.
<composite-id> <key-property name="memberId" type="long" column="MEMBER_ID"/>
<key-property name="eventDate" type="java.sql.Timestamp" column="EVENT_DATE"/>
</composite-id>
but when i am persisiting the records in database, it is not saving milliseconds of time. e.g. if my java time is 2008-08-12 00:07:33.519, it is saving 2008-08-12 00:07:33.000 in data base.
Please suggest if this is the problem with hibernate and let me know how i can persist time (with milliseconds) using hibernate.
PS - I have also tries other hibernate mappings like calendar, date etc.
|