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

13 lines
318 B
PHP

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>