1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/manual/docs/Working with objects - Dealing with relations - Updating related records.php

13 lines
424 B
PHP
Raw Normal View History

2007-04-14 01:49:11 +04:00
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>