When I use timestamp(6) Oracle column type in 9i, Hibernate only uses tenths of a second (it appears). This is a generated query:
Code:
insert into hib_member (last_updated, penn_id, last_name, is_student, some_number, some_date, member_id) values ('2004-08-21 15:43:[b]03.3[/b]', 13622843, 'Jones', 'true', 123.456, '2001-03-02', 1188)
Is there a configuration for Hibernate (or Java if that is where the issue is, I assume its not the driver, though could be there too) where we can use a more specific timestamp? We want a trigger on our table to see if the query is updating the timestamp, and if not, set it to the current timestamp. However, since Hibernate is only to tenths of a second, successive queries are getting changed by the trigger, and then Hibernate is unhappy:
Code:
Problem closing session: null, net.sf.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) for edu.upenn.isc.fast.beans.plsql.PersonArray instance with identifier: 1188
I know I could use an integer intead of timestamp for versioning, but timestamps seem more useful (as long as they work).
Thanks!
Chris