1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/manual/docs/Working with objects - Dealing with relations - Deleting related records.php

13 lines
307 B
PHP
Raw Normal View History

2007-04-14 01:49:11 +04:00
You can delete related records individually be calling delete() on each record. If you want to delete a whole record graph just call
delete on the owner record.
<code type="php">
$user->Email->delete();
$user->Phonenumber[3]->delete();
// deleting user and all related objects:
$user->delete();
</code>