0

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?

2
  • what code did you write in java to trigger this SQL? Commented Mar 5, 2012 at 14:25
  • Query is created by method merge() Commented Mar 5, 2012 at 14:46

1 Answer 1

1

it should be Long since Hibernate will use your UserType to get the value to compare to.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.