• Post Reply Bookmark Topic Watch Topic
  • New Topic

hibernate xml mapping for embedded component composite id

H Paul
Ranch Hand
Posts: 471
  • 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?

my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!