2

I would like to know how can we set a embedded primary key without annotations , it means with the mapping shadow files of hibernate ?

1

1 Answer 1

2

For Hibernate verion 4.1: In the documentation you find an example for what you want. Both XML and annotation is put there next to each other.

  • 5.1.2.1.3. Multiple id properties with with a dedicated identifier type: @IdClass and corresponding XML mapping
  • 5.1.2.1.1. id as a property using a component type: @EmbeddedId and corresponding XML mapping
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.