-->
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: Cannot delete or update a parent row - manytomany
PostPosted: Fri Jun 11, 2010 9:05 am 
Newbie

Joined: Tue Jun 01, 2010 10:18 am
Posts: 15
Hello all!

I used this for my implementation of manytomany (bidirectional):
http://tadtech.blogspot.com/2007/09/hib ... in_03.html

But now, if I want to delete an address which is connected to a person via the table PersonAddress, I get this error:
Quote:
Cannot delete or update a parent row: a foreign key constraint fails (`mydb`.`PersonAddress`, CONSTRAINT `...` FOREIGN KEY (`addressId`) REFERENCES `ADDRESS` (`id`))


What's wrong here? It seems that it can not delete the address because it is still connected to a person.
How to solve this?

Thanks a lot in advance & Best Regards.


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.