-->
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: deleting an entity in unidirectional many-to-many assoc.
PostPosted: Wed Oct 26, 2005 10:26 am 
Newbie

Joined: Fri Feb 04, 2005 11:34 am
Posts: 16
message -> group

unidirectional many-to-many

As expected, deleting a group must result removing of the corresponding entries in its association table with message. Since there is no way to navigate from group back to the messages it is referenced, to implement the functionality is the only way to find all messages having sets including to-be-deleted group and update their set and save ?

It is as easy as a single delete command in sql with on delete cascade constraints on foreign keys, but I think there is no way to tell this to hibernate since on-delete=cascade is only enabled for inverse one-to-many associations (as exception says).

Thanks in advance.

MB


Top
 Profile  
 
 Post subject: Re: deleting an entity in unidirectional many-to-many assoc.
PostPosted: Wed Nov 17, 2010 10:19 am 
Newbie

Joined: Thu Oct 07, 2010 11:19 am
Posts: 6
Hi,
I am facing the same issue, does any know the solution?

Regards.


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.