-->
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.  [ 2 posts ] 
Author Message
 Post subject: Milliseconds rounded by save in DB???
PostPosted: Thu Jan 17, 2008 8:38 am 
Newbie

Joined: Thu Jan 17, 2008 7:13 am
Posts: 2
When I save a record that contains a datetime to the DB, NHibernate rounds the milliseconds. For example: following datetime: 14/01/2008 15:27:34:148 will be saved by NHibernate as 14/01/2008 15:27:34:147.

Does anybody knows what happens here, and how we can solve this??

This is an extract of the mapping file:
<property name="DateFrom" column="ValidFrom" type="Timestamp" />


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 17, 2008 9:00 am 
Newbie

Joined: Thu Jan 17, 2008 7:13 am
Posts: 2
Problem solved. This appears to be a limitation of SQL Server... Datetimes are rounded at 3,33 milliseconds on SQL Server. This should be solved in SQL Server 2008.


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

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.