Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
kri shan
Ranch Hand
Posts: 1486
  • 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�
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!