title: Manually setting isNew() on an object
body: <p>I am working with Symfony 1.4 and propel, I have a form for products to either be created or updated and for the form action I have this code...</p>
  
  <pre><code>&lt;form action="&lt;?php echo url_for('products/'.($form-&gt;getObject()-&gt;isNew() ? 'create' : 'update').(!$form-&gt;getObject()-&gt;isNew() ? '?id='.$form-&gt;getObject()-&gt;getId() : '')) ?&gt;" method="post" ?&gt;&gt;
  </code></pre>
  
  <p>so if the product object is new then it goes to products/create but if the product already exists then it goes to products/update?id=productID.</p>
  
  <p>This all works great but the issue is that I have a link on the products called "New Version" When you click this it needs to take all of the data from the current product and prefill the form with it, so the user just needs to make whatever changes they need and then it saves as a new entry in the database. The problem is when the data is sent to the form through an object isNew is false so it goes to the update page instead of create. </p>
  
  <p>The method for copy:</p>
  
  <pre><code>  public function executeCopy(sfWebRequest $request)
        {
          $this-&gt;forward404Unless($PlatformProduct = PlatformProductPeer::retrieveByPk($request-&gt;getParameter('id')), sprintf('Object PlatformProduct does not exist (%s).', $request-&gt;getParameter('id')));
          $this-&gt;form = new PlatformProductForm($PlatformProduct);
  
          $this-&gt;setTemplate('new');
        }
  </code></pre>
  
  <p>This sends the data to the form just fine but I'm at a loss for how to make it return isNew as true so that it creates a new entry. I'm fairly new to Symfony and I've worked with Cake before, in cake it was as simple as if the ID is set it will update on save, if ID is not set it will insert on save.</p>