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

bidirectional many-to-many association mapping Vs ternary association mapping ?

 
kri shan
Ranch Hand
Posts: 1479
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the hiberante mapping, what is the difference between bidirectional many-to-many association mapping and ternary association mapping ?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Difference?
A ternary association is the practice of modeling a many-to-many relationship through the introduction of an association entity (table/object) in between the related entities and simplifying the relationships:


Hibernates gives you the option to create a ternary association by either realizing the association object explicitly (usually the preferred approach, as it is often later discovered that there are actually properties that belong to the association object- making it a full blown object rather than a modeling construct) or through a Map on the related objects with the association as the index (see 6.9. Ternary Associations, Flexible Mapping).

See also: Confused´┐Ż
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic