Using the &ltidbag&gt Element in Hibernate

Hibernate’s facility allows you to map many-to-many associations and collections of values to a single table with a surrogate key. The following code shows an example of mapping:

<idbag name="cars" table="CARS">                        

Done!

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: