Hibernate version:
3
Mapping documents:
<hibernate-mapping package="org.data">
<class
name="Projects"
table="projects"
>
...
<set name="modules" table="projectmodules" lazy="false" cascade="all">
<key column="pid"/>
<many-to-many column="mid" class="org.data.Modules"/>
</set>
...
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
saveOrUpdate, update
Name and version of the database you are using:
mysql 4.1
Issue:
When code calls update with a Project object where modules set has been updated, the debug log shows the Module table is being updated. I need to make sure the projectmodules table is updated.
I'm trying <set table="xyz"> from the documentation. I'm hoping to avoid writing a Hibernate mapping file/objects for projectmodules table, since it is just storing the association between modules and projects.
Thoughts?
-Todd
|