Hi All,
I am having some issues getting a simple custom property to work. The setup is that I've got a SQL Server table where I want to store a double in a column, and I want my Hibernate object to contain a custom class (called Decimal, my own Number subclass), which will get populated via Hibernate when reading/writing to this table.
My HBM descriptor has the column as follows:
Code:
<property name="myDecimal" type="some.package.Decimal">
<column name="my_decimal" sql-type="double precision"/>
</property>
I am able to create the table fine via SchemaExport, but Hibernate is giving me class cast exceptions when I try to load anything from this table. Does my Decimal class have to extend net.sf.hibernate.type.DoubleType? My Decimal object already extends Number, so I can't really do that, but are there other options here that I am missing and can explore?
Thanks in advance,
Adam