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: Cascade Delete
PostPosted: Fri Feb 16, 2007 5:34 am 
Newbie

Joined: Tue Nov 21, 2006 5:47 am
Posts: 12
Hi all,
j'ai une relation pere fils entre deux tables. et je veux faire une suppression ev cascade.
mon mapping est le suivant :
<class name="model.Project" table="project" lazy="false" >
<comment></comment>
<id name="id" type="int" >
<column name="id" />
<generator class="assigned" />
</id>
<property name="name" type="string">
<column name="name" length="100">
<comment></comment>
</column>
</property>
<set name="svns" cascade="all-delete-orphan" lazy="false">
<key>
<column name="id" not-null="true">
</column>
</key>
<element type="int" column="project_id"/>

</set>

Mais il s'avère qu'il supprime uniquelent la PK du pere sans faire de cascade.

Merci de votre aide.


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.