-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: timestamp or java.util.Date precision does not include the
PostPosted: Fri Feb 08, 2008 11:03 pm 
Newbie

Joined: Fri Feb 08, 2008 8:17 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.