Hibernate version:
2.1.7
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
sybase
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hi everyone
Here is my problem. I've got 2 classes, Univers & ReunionDUnivers, with a many-to-many relation between.
Univers get a Set of ReunionDUnivers & Univers get a Set of Univers.
The java code of ReunionDUnivers.java :
Code:
private Set univers;
/**
*
* @return
*
* @hibernate.set
* cascade="all"
* inverse="true"
* table="MTM_UnivSple_ReunionDUniv"
* @hibernate.collection-many-to-many
* class="com.iaf.frontalbv.om.UniversSimple"
* @hibernate.collection-key
* column="reunionDUnivers"
* @hibernate.cache
* usage="read-write"
*
*/
The java code of UniversSimple.java :
Code:
private Set reunionDUnivers;
/**
*
* @return
*
* @hibernate.set
* cascade="all"
* inverse="true"
* table="MTM_UnivSple_ReunionDUniv"
* @hibernate.collection-many-to-many
* class="com.iaf.frontalbv.om.ReunionDUnivers"
* @hibernate.collection-key
* column="univers"
* @hibernate.cache
* usage="read-write"
*
*/
The treatment code source :
Code:
Session session = Persistance.currentSession();
Transaction transaction = session.beginTransaction();
//...
//treatment and updating ReunionDUnivers object
//...
session.saveOrUpdate(omReunionDUnivers);
transaction.commit();
Everything seems good, but nothing is updated/inserted in my table.
Someone can help me?[/code]