title: symfony 1.4 doctrine Form Bind
body: <p>Perhaps simple question and I am just missing something.</p>
  
  <p>I have 2 tables that have 3 of the same fields(names/types).</p>
  
  <p><code>occurrence</code> and <code>occurrence_queue</code> </p>
  
  <pre><code>Schema
  
  Occurrence:
    tableName: occurrence
    columns:
      id: {the usual}
      date: {type: date}
      start_time: {type: time}
      end_time: {type: time}
      eid: {a forign key}
  OccurrenceQueue:
    tableName: occurrence_queue
    columns:
      id: &lt;-Same As Above-&gt;
      occurrence_id: {the usual}
      date: &lt;-Same As Above-&gt;
      start_time: &lt;-Same As Above-&gt;
      end_time: &lt;-Same As Above-&gt;
  </code></pre>
  
  <p>I then have a module That is built off <code>Occurrence</code> i.e. doctrine:generate-module <em>app</em> *name* Occurrence</p>
  
  <p>In this module I load a set of Occurrences, pretty standard so here comes the trixy part. What I want to do is load the 3 common field from <code>Occurrence</code> but when I save the form I want it to save to the <code>OccurrenceQueue</code> table instead of the <code>Occurrence</code> table.</p>
  
  <p>Form like this:</p>
  
  <pre><code>DATE: *date picker*
  Start Time: HH:MM
  End Time: HH:MM
  </code></pre>
  
  <p>Here is my failed attempt at this:</p>
  
  <pre><code>public function executeEdit(sfWebRequest $request)
  {
    $this-&gt;forward404Unless($request-&gt;isMethod(sfRequest::POST) || $request-&gt;isMethod(sfRequest::PUT));
  
    $this-&gt;forward404Unless($occurrence = Doctrine_Core::getTable('Occurrence')-&gt;find(array($request-&gt;getParameter('id'))), sprintf('Object occurrence does not exist (%s).', $request-&gt;getParameter('id')));
  
    $request-&gt;setParameter('occurrence_id',$occurrence-&gt;getId());
  
    $occurrenceQForm = new OccurrenceQueueForm($occurrenceQueue());
  
    $occurrenceQForm-&gt;bind($request-&gt;getParameter($occurrenceQForm-&gt;getName(),$request-&gt;getFiles($occurrenceQForm-&gt;getName()));
  
    if($occurrenceQForm-&gt;isValid())
    {
      $occurrenceQForm-&gt;save();
      $this-&gt;redirect("happyness");
    }
  }
  </code></pre>
  
  <p>This never validates. I <strong>assumed</strong> because the field and the validations were the same it would be all golden and what not, well not the case. So the question is, how do I accomplish this task?  In the end The idea is the <code>OccurrenceQueue</code> table will be used to update the <code>Occurrence</code> table.</p>
  
  <p>Mahalo for the help!</p>