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.