Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deleting objects in many-to-many

356806Feb 25 2003 — edited Mar 18 2003
Hi,

I have a class holding a collection of another class, both types with their own descriptor. The collection is mapped as a many-to-many relationship, ie with a relational table.

I've marked the collection attribute in the first class as being privately owned, but when I try to delete an object of the first class, TopLink only generates the SQL to delete this object and the rows in the relational table, not the rows in the table that represents the actual objects I'm holding in my collection. Therefore, of course, I get an exception since there is a referential constraint from the relational table to the table with my collection objects.

How should I do this? Can it be done simple through the descriptor or do I have to use custom queries?

Kind regards,

Katarina
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 15 2003
Added on Feb 25 2003
3 comments
437 views