-->
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: Update parent in one-to-many doesn't delete removed children
PostPosted: Tue Jun 21, 2005 12:43 pm 
Newbie

Joined: Tue Jun 21, 2005 12:34 pm
Posts: 1
I am having trouble with a parent-child relationship. Specifically dealing with children not being deleted from the DB when they are removed from the parent's collection. The mappings shown below work when I delete the parent (ie. the children are deleted from the DB as well), but on an update, the removed child is never deleted from the DB.


Hibernate version:
3.0.5

Mapping documents:
Code:
       
     <class name="DataflowDefinition"
           table="dataflow_definition"
           dynamic-update="true"
           dynamic-insert="false">
           
        <id name="id" column="dataflow_definition_id" access="field">
            <generator class="assigned"/>
        </id>
        ...
       <set name="channels" access="field" cascade="all-delete-orphan">
          <key column="dataflow_definition_id" not-null="true"/>
          <one-to-many class="ChannelDefinition"/>
        </set>
       
    </class>
    <class name="ChannelDefinition"
           table="channel_definition"
           dynamic-update="true"
           dynamic-insert="false">
           
        <id name="id" column="channel_definition_id" access="field">
            <generator class="assigned"/>
        </id>
    </class>


Name and version of the database you are using:
HSQLDB v1.7.2


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 7:09 am 
Newbie

Joined: Mon Nov 14, 2005 7:07 am
Posts: 9
I have the exact same problem.
Someone out there who can bring some light on the problem?


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.