-->
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: TemporalType.DATE not working correctly with ojdbc7.jar
PostPosted: Thu Jul 23, 2015 2:48 pm 
Newbie

Joined: Thu Jul 23, 2015 2:41 pm
Posts: 1
Hello,
We recently upgraded to start using ojdbc7.jar (12C) in place of ojdbc14.jar.
We use TemporalType.DATE in lot of our beans to store only date part of a date value. Everything was working fine.
But as soon as we moved to new ojdbc7.jar our persistence started saving time also in all the date fields. A lot of our logic compares date and now all those logic is failing.

Is there any fix for this? Or are we doing anthing wrong?
Here are some more details
Server - Tomcat 7
Hibernate version -
Code:
<dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-entitymanager</artifactId>
         <version>3.6.8.Final</version>
      </dependency>

JDBC -
Code:
<dependency>
         <groupId>com.oracle</groupId>
           <artifactId>ojdbc7</artifactId>
           <version>12.1.0.2</version>
      </dependency>


Also we have a tomcat jdbc entry -
Code:
<dependency>
         <groupId>org.apache.tomcat</groupId>
         <artifactId>tomcat-jdbc</artifactId>
         <version>7.0.19</version>
      </dependency>


So one of our attributes are defined as
Code:
@Temporal(TemporalType.DATE)
    @Column(name = "SETTLE_DT")
    private Date settleDate;


Now till we were using jdbc14 it was only storing date part and time was converted to all zeros. But now it also stores time part (which gets passed form system timestsamp).
Thanks
Himanshu
Any pointers will be helpful.


Top
 Profile  
 
 Post subject: Re: TemporalType.DATE not working correctly with ojdbc7.jar
PostPosted: Thu Oct 29, 2015 6:54 am 
Newbie

Joined: Thu Oct 29, 2015 6:48 am
Posts: 1
Hi there

I have the exact same problem using ojdbc7 and Oracle 12c with hibernate (4 and 5).
The change occured when we switched from Oracle 11 g to 12 c.

Please let me know, if you found a solution.

Reference: http://stackoverflow.com/questions/33232260/temporaltemporaltype-date-with-oracle-12


Best Regards


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.