I would appreciate it if someone help me understand why for java.util.Date in a version or timestamp element does not include the millisecond presicion for the column which is available in the database ?
Is it just a bug that hibernate does not show the prcision in the logs ?
Logs
------
delete from mjpp.COMPANY_DOCUMENT where company_id=? and company_region_id=? and COMPANY_DOC_SEQ=? and modified_date=?
2008-02-08 18:36:10,830 DEBUG org.hibernate.type.LongType -
binding '100027918' to parameter: 1
2008-02-08 18:36:10,830 DEBUG org.hibernate.type.LongType - binding '2' to parameter: 2
2008-02-08 18:36:10,830 DEBUG org.hibernate.type.LongType - binding '100023248' to parameter: 3
2008-02-08 18:36:10,830 DEBUG org.hibernate.type.TimestampType - binding
'2004-05-04 11:28:58' to parameter: 4
Actual Values in Database for modified_date column
------------------------------------------------------------
2004-05-04-11.28.58.384978
2004-05-04 11:28:58
Exception
-----------
2008-02-08 18:36:10,846 ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.rhi.mjq.core.shared.Co
d.id.EntityIdPk@5044c8[entityId=100027918,regionId=2,id=100023248]]
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html