Deleting Many-to-Many Associations?

11 views
Skip to first unread message

james....@googlemail.com

unread,
Jan 30, 2011, 5:19:43 AM1/30/11
to Outlet ORM
Hi,

I have several instances of this scenario in my current project:

Parent <-- Many-to-many --> Child

Where the association is stored in the table:

tbl_parent_child ( parent_id, child_id )

Outlet allows me to Delete the parent object:

$outlet->delete('ParentClass', $parent->id);

This operation however leaves the data for the assocation between
Parent and Child in the database, i.e. tbl_parent_child still contains
references for the delete parent object.

As far as I can see, there is no way of using Outlet to remove that
association data, as Outlet only allows deletes over Entities, and
tbl_parent_child is mapped only to the associations in the Parent and
Child classes, and not to an entity in its own right.

Any suggestions?
Reply all
Reply to author
Forward
0 new messages