-->
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.  [ 3 posts ] 
Author Message
 Post subject: some bug in hibernate3.0.5's date
PostPosted: Sun Aug 14, 2005 8:48 pm 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
Hi,every one!
I Use Hibernate3.0.5 to insert a data to oracle,the Action is very successful,but when i select that the time field from oracle9I,i find some question.
The time field of oracle is date type,Hibernate map the oracle date field to java.text.date variable,but some bug in the java.text.date. The java.text.date variable can't reserve the Hour info,can't reserve the minute info,can't reserve the second info.when i select the field of oracle:
Code:
select to_date(t.datefieldname,'yyyymmdd hh24miss') from sometablename;

the Result:
20050803 000000
How can i resolve this question?How can i write the Hour,minute,second info to the date field of oracle!!!!

thanks for you help!


Top
 Profile  
 
 Post subject: sorry,not java.text.Date
PostPosted: Sun Aug 14, 2005 10:02 pm 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
the var type of hibernate is java.util.Date,not java.text.Date


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 15, 2005 3:37 am 
Regular
Regular

Joined: Wed Jul 27, 2005 2:33 am
Posts: 118
Use java.sql.Timestamp in your hibernate mapping


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.