-->
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: Using a delete query to delete elements of a collection
PostPosted: Thu Jul 29, 2004 8:41 pm 
Regular
Regular

Joined: Thu Nov 20, 2003 10:04 pm
Posts: 64
Location: Melbourne, Australia
I'm wondering if it's possible to delete elements of a collection using a delete query.

To be specific I have a User mapping a Content mapping and a many-to-many property called favourites that maps between the two.

I want to delete all favourites that match a particular condition. Is this possible using a session.delete() query or do I have to manually iterate through the collection and remove them?

Regards,

Glen


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 29, 2004 9:24 pm 
Regular
Regular

Joined: Wed Nov 05, 2003 10:57 pm
Posts: 96
Delete them explicitly or use cascade="delete" or "all"


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.