-->
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: java.util.Date and java.sql.Date
PostPosted: Tue Jul 17, 2007 7:44 am 
Beginner
Beginner

Joined: Thu Jun 30, 2005 5:15 am
Posts: 21
Hi,

I read several posts stating that it's normal to see how hibernate maps a DATE in the database to a java.sql.Date and then assigns it to a java.util.Date property in your domain object.

As you know, there are some issues in the implementation of the method .equals in both classes: java.util.Date.equals(java.sql.Date) but the opposite isn't true due to the nanoseconds issue.

So far, what can you do to make Hibernate map a DATE field to a java.util.Date instance ? I suppose that a problem so basic as this one must be already resolved, isn't it ? Or must we use Joda Time (http://joda-time.sourceforge.net/contrib/hibernate/index.html) ?

Any comment about this would be really welcome.

Thanks in advance,
Juan[/url]


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.