title: Symfony Serializer cannot handle Doctrine Id on deserialize
body: <p>I am trying to serialize and then deserialize a Doctrine Entity in Symfony 3. Well it does not work for the <code>id</code> property of course because there's no public accessor to the <code>id</code> by default. So what's the best option for that?</p>
  
  <ol>
  <li><p>Add a <code>setId()</code> method, but that's probably a bad idea and
  undermines the doctrine default behaviour.</p></li>
  <li><p>Use a custom <code>Normalizer</code> that uses reflection to construct the
  object by just accessing the field.</p></li>
  <li><p>Give the entity some custom <code>toArray()</code>, <code>fromArray()</code> functionality and use the array values instead of the object in the serialization.</p></li>
  </ol>
  
  <p>Or am i missing something? Is there already something build into symfony for that usecase?</p>