title: Is there a built-in way to get all of the changed/updated fields in a Doctrine 2 entity
body: <p>Let's suppose I retrieve an entity <code>$e</code> and modify its state with setters:</p>
  
  <pre><code>$e-&gt;setFoo('a');
  $e-&gt;setBar('b');
  </code></pre>
  
  <p>Is there any possibility to retrieve an array of fields that have been changed?</p>
  
  <p>In case of my example I'd like to retrieve <code>foo =&gt; a, bar =&gt; b</code> as a result</p>
  
  <p>PS: yes, I know I can modify all the accessors and implement this feature manually, but I'm looking for some handy way of doing this</p>