title: Confusion with Doctrine update. (1.2.4)
body: <p>In my unit tests (on symfony 1.4), I was naively trying to edit a record to make my tests. However, I found out after some bug hunt that my script was not doing what I expected it to do. Here is the offending part:</p>
  
  <pre><code>$tp_vehicle = Doctrine_Core::getTable("tpVehicle")-&gt;find(10);
  $tp_vehicle-&gt;setLocationId(7);
  $tp_vehicle-&gt;save();
  </code></pre>
  
  <p>=> my location id has not changed whatsoever ! Whenever I do a <code>$tp_vehicle-&gt;getLocationId()</code>, I get the old value which is 8 !</p>
  
  <p>So I tried this way round</p>
  
  <pre><code>$tp_vehicle = Doctrine_Core::getTable("tpVehicle")-&gt;find(10);
  $tp_vehicle-&gt;location_id = 7;
  $tp_vehicle-&gt;save();
  </code></pre>
  
  <p>And this way:</p>
  
  <pre><code>Doctrine_Core::getTable("tpVehicle")-&gt;createQuery("v")
                              -&gt;update()
                              -&gt;set("location_id", 7)
                              -&gt;where("id = ?", 10)
                              -&gt;execute();
  </code></pre>
  
  <p>With no luck !
  In the end, I could get What I wanted with this piece of code:</p>
  
  <pre><code>$tp_vehicle-&gt;setLocation(Doctrine_Core::getTable("tpLocation")-&gt;find(7));
  </code></pre>
  
  <p>Which is quite awkward to me, since I really do not understand the logic that is at work behind this. I kind of have the intuition that I am missing something related to cache and doctrine optimizations but... I fail to understand exactly how this is all put together.</p>
  
  <p>Can anyone shed a light on this ?</p>