I posted same topic in the sun forum:
http://forum.java.sun.com/thread.jspa?threadID=5226526
I was trying to access a column with data type 'INTERVAL DAY TO SECOND' in Oracle by doing this:
Code:
<property name="sampleTime" type="oracle.sql.INTERVALDS">
<column name="acct_life_time" sql-type="interval_year_to_month" />
</property>
But I got this result:
INFO SerializableType:178 - could not read column value from result set: acct3_7_; could not deserialize
Exception in thread "main" org.springframework.orm.hibernate3.HibernateSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException: could not deserialize
Caused by: org.hibernate.type.SerializationException: could not deserialize
I tried extending oracle.sql.INTERVALDS and implementing Serializable but I still get the same error.
I'm now thinking of implementing UserType but I don't know the right approach to using custom types.
Any help? Ideas?
Thanks a lot!