-->
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.  [ 1 post ] 
Author Message
 Post subject: Delete an element from a collection of an Object
PostPosted: Wed Jan 24, 2007 5:44 pm 
Newbie

Joined: Wed Jan 10, 2007 1:40 pm
Posts: 12
I have an object with a collection. What I would like to do is load the object back into my program and delete one element from the collection. I then want to update the object using update and remove the element from the database. What happens now is that the update does not remove the element in the collection. Is there a way to tell hibernate that if I remove an element from an object's collect without specifically pointing to the element and doing a delete?

I have something like this

<hibernate-mapping>
<class name="HeaderVO" table="HEADER" schema="DBAACCTS" lazy="false" >
<id name="controlNumber" >
<column name="CONTROLNUM" />
<generator class="assigned" />
</id>
....
<set
lazy="false"
name="account_list"
cascade="all"
inverse="true"
outer-join="true"
fetch="join"
order-by="linenum asc">
<key column="CONTROLNUM"/>
<one-to-many entity-name="DPAccountVO" />
</set>

......


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.