Problem deleting information in a join table in a M:N relationship?
I'm using WebLogic 8.1 with an Oracle database. I have two CMP
beans (users and roles) that have a many-to-many, bidirectional
relationship. Since it is a M:N relationship, I have a join table,
user_role_table, consisting of a user_id and a role_id. Given a
specific user_id, I want to be able to delete all the rows in that
table with that user_id using CMP. (The equivalent SQL would be:
delete from user_role where user_id = XXX.)
How would I do this? I tried removing the Role bean, User bean, and
both. I keep getting exceptions and the rows aren't deleted.
Cascade-delete is not supported for a many-to-many relationship in
WebLogic 8. Am I doing something wrong? Is there any way to delete
from a join table using CMP?
Thanks in advance for your help.