-->
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.  [ 3 posts ] 
Author Message
 Post subject: all-delete-orphan question(s)
PostPosted: Tue Oct 26, 2004 9:45 am 
Beginner
Beginner

Joined: Fri Oct 15, 2004 4:54 pm
Posts: 32
[b]Hibernate version: 2.1.6[/b]

a couple of my team members are having a problem with an HQL query i wrote (backed by an object mapped up by a co-worker). the strange part, to me, is that the query is a find, yet the error from hibernate is

[b]A database error has occurred. Details: Error in ThingDAO.findAll(): net.sf.hibernate.HibernateException: You may not dereference a collection with cascade="all-delete-orphan"[/b]

any ideas/pointers as to why an HQL find complains about something that should only come into play on deletes?

not knowing exactly what [i]all-delete-orphan[/i] means, i looked in the documentation online. i found:

[b]If a transient child is becomes unreferenced by a persistent parent, nothing special happens (the application should explicitly delete the child if necessary) unless cascade="all-delete-orphan", in which case the "orphaned" child is deleted.[/b]

that last bit confuses me - deleted from where? if the child is transient, it doesn't need to be deleted from anywhere, does it?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 26, 2004 9:53 am 
Senior
Senior

Joined: Fri Jun 18, 2004 10:17 am
Posts: 140
look at my question just before yours!

http://forum.hibernate.org/viewtopic.php?t=935683


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 26, 2004 10:13 am 
Beginner
Beginner

Joined: Fri Oct 15, 2004 4:54 pm
Posts: 32
your problem is exactly mine, and you were 25 minutes ahead of me. i'll keep an eye on both topics, thanks!


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