Reputation: 29673
I have mapped class, that have ID with custom type
<id name="idPersistent" type="objectID" column="aa_id" >
<generator class="ObjectIDSequenceGenerator">
<param name="sequence">lab_patient_seq</param>
</generator>
</id>
Field aa_id have type in DB
number(14)
My ID's sustom type have have types Long and ObjectID (ObjectID is my class). (nullSafeGet return ObjectID, nullSafeSet return Long).
In SQL query, created by hibernate, i have next
select patient0_.aa_id as aa1_1224_1_ ...... and patient0_.aa_id=?
What type will be on "?" position? Where from Hibernate get '?' value?
Upvotes: 0
Views: 105
Reputation: 30803
it should be Long since Hibernate will use your UserType to get the value to compare to.
Upvotes: 1