title: Value setted to null on flush doctrine
body: <p>I've got a problem with my code. I am just trying to insert a simple set of data to my db, but doctrine insert my attribute (telVerifCode) as NULL.</p>
  
  <p>I've dumped my data and figured out, that attribute (telVerifCode) has some value in it, but after I flush it is set to NULL.</p>
  
  <p>This is my controller:</p>
  
  <pre><code>$user = $this-&gt;getUser();
  
  if ($user-&gt;getTel() != $tel || $user-&gt;getTelCode() != $telCode) {
  
      try {
          $code = $this-&gt;sendTelehopneCode($user);
      } catch (\Exception $e) {
          //.......
      }
  
      // update user phone verifcation fields //
      $user-&gt;setTelVerifCode($code);
      $user-&gt;setLastTelVerificationCodeDate(new \DateTime());
  
      $em-&gt;persist($user);
      $em-&gt;flush();
  }
  </code></pre>
  
  <p>My ORM Mapping:</p>
  
  <pre><code>/**
   * @var string
   *
   * @ORM\Column(name="tel_verification_code", type="string", length=255, nullable=true)
   */
  protected $telVerifCode;
  /**
   * @var \DateTime
   *
   * @ORM\Column(name="last_tel_verification_code_date", type="date", nullable=true)
   */
  protected $lastTelVerificationCodeDate;
  </code></pre>
  
  <p>sendTelehopneCode function :</p>
  
  <pre><code>private function sendTelehopneCode($user)
  {
      $code = strval(rand(100000, 999999));
      $tel = $user-&gt;getTelCode() . $user-&gt;getTel();
      $msg = 'code:' . $code;
  
      $twilio = $this-&gt;get('twilio.api');
      try {
          $message = $twilio-&gt;account-&gt;messages-&gt;sendMessage(
              "+14*******", // Verified Outgoing Caller ID or Twilio number
              $tel, // The phone number you wish to send a message to
              $msg
          );
      } catch (\Services_Twilio_RestException $e) {
          throw $e;
      }
  
      return $code;
  }
  </code></pre>