-->
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: cascading evict()
PostPosted: Fri Dec 23, 2005 8:44 am 
Newbie

Joined: Tue Dec 13, 2005 5:43 pm
Posts: 5
hello,
I have a (probably) basic problem regarding evicting objects with Hibernate 3.1.

I have the following mapping
Code:
<class name="generated.GeSectionGroup" table="GE_SECTION_GROUP" lazy="false">
    <set name="geSections" lazy="true" inverse="true" cascade="all">
        <key>
            <column name="GESG_ID" />
        </key>
        <one-to-many class="generated.GeSection"/>
    </set>
</class>


when I do

Code:
GeSectionGroup gsg = GeOutage.getGeSectionGroup();
session.evict(gsg);


I can see that my 'gsg' is evicted, but the elements of the geSections set is not evicted. Shouldn't cascade=all take care of this for me?
The reason I am doing this, is that I'm running into the NonUniqueObjectException when trying to save and I would like to evict the objects before saving...

Any help would be appreciated

cheers,
Kenny


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 23, 2005 9:38 am 
Beginner
Beginner

Joined: Sat Dec 17, 2005 1:24 pm
Posts: 42
Location: Berlin, Germany
Hi!

Have you tried, wheather it behaves different with

[...] cascade="all, delete-orphan" [...]

All the best,

René


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.