Lesson – 62 : Hibernate – Many To Many Using idbag tag using XML and Annotation based Config

Hibernate — Assotations/Relationship : <idbag> Tag In Hibernate : 1. While working with many-to-many relationship a join table of relationship contains foreign keys. The foreign keys in the table contains duplicate values. 2. In order to maintain the data easily in a join table there is a need of primary key also for the join table. 3. If a primary key column is also added for a join table then we need to inform about primary key column to the hibernate by configuring <idbag> tag in the mapping file or hbm file of the hibernate. 4. If you want to configure <idbag> tag in a mapping file the pojo class should contains a collection of type java.util.List. 5. If a primary key column is added for a join table then the value to that primary key column should be generated by h

It's only fair to share...Tweet about this on TwitterShare on FacebookShare on TumblrShare on Google+Digg thisShare on LinkedInPin on PinterestShare on VKShare on RedditPrint this pageEmail this to someone
Flattr the authorShare on StumbleUponShare on YummlyBuffer this page

Leave a Reply

Your email address will not be published. Required fields are marked *