Joined: Thu Nov 16, 2006 11:52 am Posts: 8 Location: Frankfurt a.M., Germany
|
Hello,
we have a many-to-many realtionship where the mapping table besides the respective foreign keys contain additional fields that need to be filled when a new entry is inserted into the mapping table.
The question is now how the values for these additional fields can be inserted. In the category-item example in the hibernate docs the mapping table CATEGORY_ITEM is only specified in the hbm.xml. There is no Java-side class defined that would represent the mapping table as this is usually not needed.
Does anybody have an idea how to make sure that these additional fields in the mapping table can be filled using the same transaction that was used to insert the other entries for the many-to-many relationship?
Thanks, Oliver Holp
|
|