2007-04-14 01:49:11 +04:00
|
|
|
When accessing related records and if those records do not exists Doctrine automatically creates new records.
|
2007-04-13 00:52:30 +04:00
|
|
|
|
2007-04-14 01:49:11 +04:00
|
|
|
<code type="php">
|
|
|
|
// NOTE: related record have always the first letter in uppercase
|
|
|
|
$email = $user->Email;
|
|
|
|
|
|
|
|
$email->address = 'jackdaniels@drinkmore.info';
|
|
|
|
|
|
|
|
$user->save();
|
|
|
|
|
|
|
|
// alternative:
|
|
|
|
|
|
|
|
$user->Email->address = 'jackdaniels@drinkmore.info';
|
|
|
|
|
|
|
|
$user->save();
|
|
|
|
</code>
|