I've seen a few things on the forums/JIRA on this, but I can't quite find what 
the actual solution is.

I have a many-to-many relationship.  The tables are typical, normalized 
ER-style:

ENTITY_A
  idA
  nameA

ENTITY_B
  idB
  nameB

RELATION_AB
  idA
  idB

When I go to delete an ENTITY_A, I can't CascadeType.REMOVE (spec seems to 
imply this is not required to be supported, if not outright disallowed) and 
I've seen some Hibernate JIRA issues talking about how this isn't supported) - 
so how do I delete the rows in RELATION_AB.

I simply want to remove all rows from RELATION_AB where idA is the id of the 
deleted ENTITY_A.

AFAICT, it looks like I have to create a native query and just execute SQL to 
do the delete.

Is this true?  If not, what does the EJBQL look like (not the native SQL)?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3936057#3936057

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3936057


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to