title: How does doctrine handles unchanged field when updating an already existing entity
body: <p>Supposing I have an entity mapped to a <code>MariaDB</code> database table with the following fields: <code>ID</code>, <code>firstName</code> and <code>lastName</code>.<br>
  This entity has been loaded from the database in the PHP object and I execute the following code</p>
  
  <pre class="lang-php prettyprint-override"><code>/**
   * $myEntity is the entity and $em is the entity manager
   * $myEntity-&gt;getFirstName(); Would be John
   * $myEntity-&gt;getLastName(); Would be Doe
   */
  
  $myEntity-&gt;setFirstName("Bob");
  
  $em-&gt;persist($myEntity);
  $em-&gt;flush();
  </code></pre>
  
  <p>Will this result in the following query:</p>
  
  <pre><code>UPDATE `table`SET `firstName` = 'Bob' WHERE `ID`= "x"
  </code></pre>
  
  <p>Or the following query:</p>
  
  <pre><code>UPDATE `table` SET `firstName` = 'Bob', SET `lastName` = 'Doe' WHERE `ID` = 'x'
  </code></pre>
  
  <p>More generally: How does Doctrine handles unchanged fields, and what is consired as "unchhanged" ? Same value, no variable assignation, something else?<br>
  I have searched in the Doctrine documentation and on Google but I have found nothing about this question.   </p>
  
  <p>I am asking because I have an entity which is, obviously, bigger than the one in the example (35 columns, including 2 <code>TEXT</code> columns) and often only one or two columns are updated at a time.</p>