Hi,
We are using Hibernate 3.1RC2 and DB2 8.2.
On the db we have defined an user defined data type named TABLEID which type is BIGINT.
Does anyone know how to map this user defined type in Hibernate ?
We have tried using a custom type and the java type for that attribute defined as that custom type.
The problem is that Hibernate issue an error, such as a cast must be done on that field.
Example:
The next select
SELECT FROM TABLE_NAME WHERE TABLEID = ?
would work if we use
SELECT FROM TABLE_NAME WHERE ID = CAST(? AS TABLEID)
(ID is of TABLEID type)
So, how to instruct Hibernate to generate such CAST or maybe another solution.
|