-->
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.sql.Time problem while using Hibernate
PostPosted: Wed Jun 08, 2005 4:59 am 
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Hi,
I have an object 'XYZHibernateObject' that has been mapped to table 'XYZ'.
Table 'XYZ' has 2 fields of type Time and Date
I have mapped these fields in 'XYZHibernateObject' with the java.sql.Time and java.sql.Date types respectively.

I then save this object through hibernate. Problem arises when i try to retrieve the SAME object back. I get exception while retrieving the object.

I did a little bit of debugging and found that Hibernate is internally using java.util.Time and java.util.Date.
When hibernate invokes the database driver passing these types, the driver throws an exception saying that it failed on getTime method.
This happens because, the driver is expecting java.sql.Time.
I am using Teradata driver.

Is this a bug, in Hibernate? Is there any solution for this?


Thank you.


Top
  
 
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.