This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate xml mapping for embedded component composite id

 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic