Forums Register Login

hibernate xml mapping for embedded component composite id

+Pie Number of slices to send: Send
Idea: I have 1 entity (table) Customer that has an embeddedid (composite id) CustomerId.
This CustomerId has an embeddable (component) Address (it is a component, not an entity (a separate table)
See below code for classes/ xml mapping below.

I try to map the composite id for CustomerId. Syntax-wise, I tried this/that but not worked.

I can not use <key-many-to-one of <composite-id since Address is not an Entity.

Any hints?



That is a really big piece of pie for such a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2692 times.
Similar Threads
EJB3 Beta Certification - EntityManager BASIC notes. (PART II)
Hibernate: read-only on @Column in embedded ID composite key classes mapping exception - bug?
Problem in Mapping
java.lang.ClassNotFoundException: javax.persistence.JoinTable
PK in aggregated entity with other non-key attributes?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:35:50.