-->
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: TemporalType.Date and 2nd level cache
PostPosted: Tue Feb 26, 2013 4:51 am 
Newbie

Joined: Tue Feb 26, 2013 4:35 am
Posts: 1
Hi,
I have following problem. I have a java.util.Date field in my entity which is temporary mapped as java.sql.Date

@Column
@Temporal(TemporalType.DATE)
private Date birthDay;

While getting my entity this field is of type java.sql.Date and does not have a time value. When i update it and get it once again this date has time value. Its also not type of java.sql.Date but java.util.Date.
It happened after i added 2nd level cache. Any hint what is going on ? Why it added some dummy time to my date ?

Im using latest hibernate version 4.1.10.Final with hibernate-ehcache as cache implementation.


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.