-->
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: Resolution loss when using DateTime with Firebird
PostPosted: Tue Nov 13, 2007 4:34 pm 
Newbie

Joined: Tue Nov 13, 2007 4:10 pm
Posts: 2
Hi,

One of my mapped properties is a DateTime and when I switched to Firebird (from SQLite), I noticed the following strange behaviour.

If I put a DateTime.MaxValue into this field and let NHibernate save it to the database. It seems to be working, but when I read it out again, it does not have exactly the same value as it had when it was originally saved. The value has changed with a few thousand ticks. However, they are so similar, that they look the same when printed out with a ToString. But still, they are not equal and some of my test cases fail due to this.

I suspect that NHibernate tries convert the native Timestamp Firebird field into ticks, before it converts it back into a DateTime and during this procedure it looses precision.

Is this a known problem with the Firebird dialect?

Best Regards
//Jan Persson


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.