-->
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.  [ 4 posts ] 
Author Message
 Post subject: You may not dereference an collection with cascade="all
PostPosted: Tue Nov 08, 2005 3:46 pm 
Downloaded 1.0 version and I am getting this error. Is this know to anyone.

[HibernateException: You may not dereference an collection with cascade="all-delete-orphan"]


Thanks,
-M


Top
  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 11:45 am 
Contributor
Contributor

Joined: Thu May 12, 2005 9:45 am
Posts: 593
Location: nhibernate.org
It looks like you are doing:
Code:
myEntity.MyCollection = new ...;

where MyCollection was initialized by NHibernate...
(In this case, the session will no longer be able to tell which items are orphan...)

_________________
Pierre Henri Kuaté.
Get NHibernate in Action Now!


Top
 Profile  
 
 Post subject: You may not dereference an collection with cascade="all
PostPosted: Mon Nov 14, 2005 6:04 pm 
You response is a bit cryptic. Can you elaborate a little bit more.

Thanks


Top
  
 
 Post subject:
PostPosted: Tue Nov 15, 2005 6:53 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
The word "dereference" here means you can't replace the whole collection belonging to an object by another new instance, i.e. doing something like:

myEntity.MyCollection = new ArrayList/HashMap/Whatever();

Since then it's not possible to reliably track changes in the collection. Check your code for this and do a Clear() instead.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.