[jboss-user] [EJB 3.0] - Re: Foreign key reference with cascading delete
jbr
do-not-reply at jboss.com
Thu Oct 19 10:14:59 EDT 2006
Hi Wolfgang,
thanks for your help. I tried your suggestion. You are right as far as the user would survive the remove of a listEntry. But with this configuration i can't delete a user before all referencing listEntries are removed.
In terms of ER-Modelling it creates something like this:
| table user(String id, String name, ...)
|
| table listEntry(String id,
| String userId references user.id,
| String listId references list.id on delete cascade)
|
| table list(String id, String name)
|
|
But what I need is:
| table user(String id, String name, ...)
|
| table listEntry(String id,
| String userId references user.id on delete cascade,
| String listId references list.id on delete cascade)
|
| table list(String id, String name)
|
|
That's not exactly what i wanted, as i still need to cleanup the listentries manually before i can delete the user.
Have u successfully implemented something like that before?
Best Regards
Juergen
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979367#3979367
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979367
More information about the jboss-user
mailing list