This commit is contained in:
parent
fcee65cb86
commit
7fef24f7a6
@ -192,6 +192,18 @@ Sometimes you may want to get a copy of your object (a new object with all prope
|
||||
$copy = $user->copy();
|
||||
</code>
|
||||
|
||||
++++ Saving a blank record
|
||||
|
||||
By default Doctrine doesn't execute when save() is being called on an unmodified record. There might be situations where you want to force-insert the record even if it has not been modified. This can be achieved by assigning the state of the object to Doctrine_Recort::STATE_TDIRTY.
|
||||
|
||||
<code type="php">
|
||||
$user = new User();
|
||||
$user->state('TDIRTY');
|
||||
$user->save();
|
||||
|
||||
$user->id; // 1
|
||||
</code>
|
||||
|
||||
|
||||
++++ Serializing
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user