Author: Russ
Date: 2010-03-04 22:24:49 +0100 (Thu, 04 Mar 2010)
New Revision: 28385

Modified:
   plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/form/sfFormDoctrine.class.php
Log:
[1.4][sfDoctrine2Plugin] Fix form isNew logic


Modified: 
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/form/sfFormDoctrine.class.php
===================================================================
--- plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/form/sfFormDoctrine.class.php 
2010-03-04 20:19:54 UTC (rev 28384)
+++ plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/form/sfFormDoctrine.class.php 
2010-03-04 21:24:49 UTC (rev 28385)
@@ -94,8 +94,9 @@
     if (is_null($this->isNew))
     {
       $id = 
$this->em->getMetadataFactory()->getMetadataFor(get_class($this->object))->getIdentifierValues($this->object);
-      $this->isNew = ($this->em->contains($this->object) && ! empty($id)) ? 
true : false;
+      $this->isNew = empty($id) ? true : false;
     }
+
     return $this->isNew;
   }
 

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to