Dear All
I have problems in Many-to-Many association. Basically i have table "A" and table "B" and an association table "A-B". I have mapped both the Tables and mapped Many-to-Many association from A->B specifying the association table "A-B". When i insert records into table "A" with collection of "B" set in A, i want the table "A" and the association table "AB" to be affected. But, for me Hibernate updates the table "B" also..I don't want to do that..Because, table "B" is a Type table where in the Data is static.
Any help would be highly appreciated..
Find below the mapping iam using..
<bag
name="gradesTaughtList"
table="Teacher_Grades_Taught"
lazy="true"
inverse="true"
cascade="save-update"
>
<key
column="profile_id"
>
</key>
<many-to-many
class="com.harcourt.alamo.model.Grade"
column="grade_type_id"
outer-join="auto"
/>
</bag>
In the above mapping, i want the "Teacher_Grades_Taught" table to be updated, not the "Grade" table
Regards
Kaleel
|