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

Collection of Entities in an Embeddable?

 
Joshua Elkino
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible (so far my debugger says no) to have a set of entities in an embeddable object?

I'm looking to add a One to Many relationship between an embeddable object and an entity object.
 
Danilo Dadonas
Ranch Hand
Posts: 59
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Ilya. An object just can embeddable if the attributes are in the same table.
For example, if you have a table "customer" with attributes of home address, billing address, etc, they can be an emdeddable class. But if the customer can have 1 or more billing addresses? In this case, billing address would be a table. The class BillingAddress now cannot be embeddable, but have to be an component. Customer has one or more BillingAddress.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic