From 7fef24f7a634f13eba5c84597a296c4f2945891a Mon Sep 17 00:00:00 2001 From: zYne Date: Thu, 5 Jul 2007 16:47:31 +0000 Subject: [PATCH] --- .../component-overview/record.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/manual/new/docs/en/working-with-objects/component-overview/record.txt b/manual/new/docs/en/working-with-objects/component-overview/record.txt index 4bfd1a67e..7cabedc1d 100644 --- a/manual/new/docs/en/working-with-objects/component-overview/record.txt +++ b/manual/new/docs/en/working-with-objects/component-overview/record.txt @@ -192,6 +192,18 @@ Sometimes you may want to get a copy of your object (a new object with all prope $copy = $user->copy(); +++++ 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. + + +$user = new User(); +$user->state('TDIRTY'); +$user->save(); + +$user->id; // 1 + + ++++ Serializing