----- Original Message -----
From:
tristan.paddock@xxxxxxxxx
To:
eclipselink-users@xxxxxxxxxxx
Sent: Tuesday, December 29, 2009 12:03:32 PM GMT -05:00 US/Canada Eastern
Subject: [eclipselink-users] Delete ManyToMany Relationship
I am fairly new to ORMs and EclipseLink and am having trouble deleting
objects out of a DB because a rows in a cross-reference table are not being
deleted before an object is deleted and thus foreign key constraints are
violated.
Here is an overview of the part of the DB in question:
Property <-----> PropertyCoverageXref <-----> Coverage
PropertyCoverageXref contains the PKs of Property and Coverage.
The Property object contains a ValueHolderInterface to Coverage objects.
Coverage objects do not contain any reference to Property objects.
The DB mapping schema is built up using the EclipseLink Workbench. The
coverageHolder attribute in Property is defined as a many-to-many
relationship to the Coverage descriptor. The Table Reference Relation Table
is defined to be PropertyCoverageXref. The Source and Target Reference are
set up to use the PKs of Property and Coverage respectively.
Here is the problem that I am having: When I try to remove a Property
object via a UnitOfWork the 'predelete' never happens because the session is
a UnitOfWork when predelete() is called.
My guess is that I am missing some sort of configuration or something. But
as I said, I have very limited experience with EclipseLink and I am at a
loss. If there is more information that I should provide or something needs
clarifying please let me know.
Thanks for the help,
Tristan
--
View this message in context:
http://old.nabble.com/Delete-ManyToMany-Relationship-tp26957070p26957070.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users