Hello, I have some problems when I try to delete an object using hibernate.
I'm using the cascade=all in the parent object and this is the relation:
<set name="TrafficList_Set" table="TrafficList" cascade="all" inverse="false" lazy="false">
<key column="ID_Scenario"/>
<many-to-many column="ID_Traffic"
class="trfg_TRAFGEN_DataModel.Traffic"/>
</set>
The object I'm trying to delete is of the class trfg_TRAFGEN_DataModel.Traffic
I use the delete method but, after that, I get an exception: net.sf.hibernate.HibernateException: Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade
How can I delete this object?
Thank you to everybody
|