title: Get old value before update a record in a form
body: <p>I have 2 tables: Photos and Albums. In the album table I have a field with the number of photos of that album.</p>
  
  <p>When I update a photo if I change the album I need to update the number of photos field of the albums table to reflect the changes.</p>
  
  <pre><code>    public function updateObject($values=null)
      {        
          $object = parent::updateObject($values);
  
          if($this-&gt;isNew)
          {
           ...
          }
          else
          {
            $old_album = Doctrine_Core::getTable('Photos')
                          -&gt;find($object-&gt;getId())-&gt;getAlbums();
            if($old_album != $object-&gt;getAlbums()
               //update number of photos
          }
      }
  </code></pre>
  
  <p>but the <code>$object-&gt;getAlbums()</code> is always getting the same value as <code>$old_album;</code>
  if I remove the <code>$old_album</code> the <code>$object-&gt;getAlbums()</code> gets the correct value.</p>
  
  <p>Whats wrong?</p>