1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/docs/Working with objects - Dealing with relations - Updating related records.php
2007-04-13 21:49:11 +00:00

13 lines
424 B
PHP

You can update the related records by calling save for each related object / collection individually or by calling
save on the object that owns the other objects. You can also call Doctrine_Connection::flush which saves all pending objects.
<code type="php">
$user->Email['address'] = 'koskenkorva@drinkmore.info';
$user->Phonenumber[0]->phonenumber = '123123';
$user->save();
// saves the email and phonenumber
</code>