-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Delete elements
PostPosted: Wed Jun 30, 2004 8:24 am 
Newbie

Joined: Fri Oct 24, 2003 3:31 am
Posts: 5
Location: Spain (Madrid)
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 30, 2004 8:47 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
read twice " parent child relationship", you have to manage the association depending how you have mapped your model

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.