Hi,

please stick to the user forum for such questions, as you have been told already. This is a developer list.

Michael

I've got a list of child objects (keywords) that I'd like to store in a
separate table. My configuration is as such (it's xdoclet, but I'm sure you
can see the gist of it):

/**
* Returns the keyword list associated with the referenced physical asset.
*
* @hibernate.set table="ImageMaster_Keywords" lazy="false"
cascade="all-delete-orphan"
* @hibernate.collection-key column="imagemaster_fk"
* @hibernate.collection-one-to-many
class="com.enetworks.style2.ssms.common.dao.Keyword"
* @return List of keywords
*/
public Set getKeywords() {
return keywords;
}

I've used all-delete-orphan for the cascade definition since I want all
actions to be cascaded from the parent to the child, and in particular I'd
like orphan children to be deleted.

Well, it's not happening - one of my tests creates the parent object, sets a
bunch of keywords, then saves the object in the database. Then it retrieves
the same object and removes some of the keywords and stores it again. Now,
the old keywords that were removed are still in the database - the PK is set
to null, which makes sense, but that's behavior I would expect with all or
save-update and not with all-delete-orphan. Does anyone know what I need to
do to make this work?



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


--
Michael Gloegl          mail:  [EMAIL PROTECTED]
                        www:   http://www.gloegl.de
                        phone: +49 (0)176 24 111 070


------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to