-->
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 by default, but how to switch it off in code??
PostPosted: Mon Sep 01, 2003 7:16 am 
Newbie

Joined: Mon Sep 01, 2003 7:10 am
Posts: 4
Hi,

I've got a hibernate class 'issue' with a property which gets a collection of 'regions' set to cascade="all", and this works fine. Each time I do a query for 'issue' it also queries to get the associated 'regions'.

But I also want to trawl through all 'issues' and archive them. I don't need the associated 'regions' when doing this, so is there a way in my code to switch off cascade="all"?

Cheers,
Chico.

ps. Nice forum by the way :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 01, 2003 7:22 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Association fetching strategies have nothing to do with cascades! Exactly what query are you using to fetch the issues?


It should be as simple as mapping the collection with lazy="true"


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.