title: Doctrine merge: DateTime field always updated
body: <p>I create a new Entity with an existing <code>Id</code>, and I want to update the related database record.</p>
  
  <p>Doctrine <a href="http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/working-with-objects.html#merging-entities">merge</a>
  has been my best friend: recognizes if there are changes and generates the correct update query.</p>
  
  <pre><code>$entity = new Entity();
  $entity-&gt;setId(1);
  $entity-&gt;setName('test');
  $EntityManager-&gt;merge($entity);
  $EntityManager-&gt;flush();
  </code></pre>
  
  <p>Suppose that the element with the id=1 already exists in the db: if the name is different from 'test', Doctrine generates this query:</p>
  
  <pre><code>UPDATE table SET name = ? WHERE id = ? ["test","1"]
  </code></pre>
  
  <p>If I run again the code above, Doctrine recognizes that nothing is changed, and no query is committed.</p>
  
  <p><strong>But...</strong> when I set a DateTime field, Doctrine consider it as changed and always runs the update query:</p>
  
  <pre><code>$entity = new Entity();
  $entity-&gt;setId(1);
  $entity-&gt;setDate(new \DateTime(2000-01-01));
  $EntityManager-&gt;merge($entity);
  $EntityManager-&gt;flush();
  //* ALWAYS commits this query:
  &gt;&gt; UPDATE table SET date = ? WHERE id = ? ["2000-01-01 00:00:00","1"]
  </code></pre>
  
  <p>Do you know a way to avoid this useless update? Thanks!</p>