-->
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: cascade="all-delete-orphan" dereference exception
PostPosted: Tue Jun 01, 2004 5:12 pm 
Newbie

Joined: Mon Mar 08, 2004 2:24 pm
Posts: 13
Location: Tampa, FL, USA
I have an object that has a one-to-many relationship with another object. I'm receiving the following exception when trying to save the parent:

net.sf.hibernate.HibernateException: You may not dereference a collection with cascade="all-delete-orphan"

Before I post all of the mapping details, can anyone tell me generally what causes this? Maybe it'll ring a bell and I can run this down myself.

P.S. - When using cascade="all", saving works fine. The reason I switched to "all-delete-orphan" was because when I removed items from the collection, they were not being deleted from the database and after scanning the forum, this option seemed to work.

Thanks,
John


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 6:00 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Hibernate keep deletion state inside the collection impl, so deferencing the collection with a new one, will lost this state.

_________________
Emmanuel


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.