-->
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: problem with many-to-many delete
PostPosted: Fri Feb 13, 2004 7:52 am 
Newbie

Joined: Sat Oct 11, 2003 2:01 pm
Posts: 7
Hi,

I'm probably missing something, but shouldn't many-to-many sets behave the same way as composite-element sets in delete situation?

I have an entity which has many-to-many set without cascades (I don't want it to cascade over the link table). When I try to make session.delete("...") it fails, because link table foreign key constraints kick in.

Only delete I'm seeing in the log is the parent entitys. That's when it fails. Link table rows should be deleted first.

Code:
    <set
        name="types"
        lazy="false"
        inverse="false"
        table="LINK"
        >
        <key>
            <column name="THING_ID" />
        </key>
        <many-to-many
            column="TYPE_ID"
            class="zzz.Type" />
    </set>

...

session.delete("from Thing thing where thing.prop > 123");



Thanks in advance!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 13, 2004 9:22 am 
Newbie

Joined: Sat Oct 11, 2003 2:01 pm
Posts: 7
It seems that the problem was in the AS/400 DB2... I don't know what caused the problem, but I'll try to find it out.

I restarted the server and now it's working fine.


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.