title: Update UserEntiy without changing password
body: <p>I have User Entity for <a href="https://symfony.com/doc/current/components/security.html" rel="nofollow noreferrer">user registration</a> on Symfony 4</p>
  
  <p>I have User entity which has password.</p>
  
  <p>Now I want to update some parts of row by Sonata Admin Bundle.</p>
  
  <p>However it fails to update User entity because of there is no password.</p>
  
  <p>in my UserAdmin.php</p>
  
  <pre><code>$formMapper-&gt;add('email');
  $formMapper-&gt;add('nickName',null,array('required' =&gt; false));
  $formMapper-&gt;add('enabled',null,array('required' =&gt; false));
  </code></pre>
  
  <p>I just want to change nickName or email without touching password.</p>
  
  <p>in Entity I don't use validation, use <code>Assert</code> like this</p>
  
  <p><code>User.php</code></p>
  
  <pre><code>/**
   * @Assert\NotBlank()
   * @Assert\Length(max=4096)
   */
  private $plainPassword;
  
  /**
   * The below length depends on the "algorithm" you use for encoding
   * the password, but this works well with bcrypt.
   *
   * @ORM\Column(type="string", length=64)
   */
  private $password;
  </code></pre>
  
  <p>When registration, it works well like this in Controller.</p>
  
  <pre><code>$password = $passwordEncoder-&gt;encodePassword($user, $user-&gt;getPlainPassword());
  $user-&gt;setPassword($password);
  
  $entityManager = $this-&gt;getDoctrine()-&gt;getManager();
  $entityManager-&gt;persist($user);
  $entityManager-&gt;flush();
  </code></pre>