title: Symfony 3 : DateTime null even if it is specified in the Entity constructor
body: <p>I'm under Symfony 3.0.6
  I use loadFixtures with this Entity : </p>
  
  <pre><code>&lt;?php
  
  namespace AppBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * Categorie
   *
   * @ORM\Table(name="categorie")
   * @ORM\Entity(repositoryClass="AppBundle\Repository\CategorieRepository")
   */
  class Categorie
  {
      /**
       * @var int
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      /**
       * @var string
       *
       * @ORM\Column(name="Libelle", type="string", length=100)
       */
      private $libelle;
  
      /**
       * @var datetime
       *
       * @ORM\Column(name="created_at", type="datetime")
       */
      private $created_at;
  
      /**
       * @ORM\ManyToOne(targetEntity="\AppBundle\Entity\User", inversedBy="categories")
       * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
       */
      private $user;
  
      public function __construct()
      {
          $this-&gt;createdAt = new \DateTime('now');
      }
  
      /**
       * Get id
       *
       * @return int
       */
      public function getId()
      {
          return $this-&gt;id;
      }
  
      /**
       * Set libelle
       *
       * @param string $libelle
       *
       * @return Categorie
       */
      public function setLibelle($libelle)
      {
          $this-&gt;libelle = $libelle;
  
          return $this;
      }
  
      /**
       * Get libelle
       *
       * @return string
       */
      public function getLibelle()
      {
          return $this-&gt;libelle;
      }
  
      /**
       * Set user
       *
       * @param \AppBundle\Entity\User $user
       *
       * @return Categorie
       */
      public function setUser(User $user = null)
      {
          $this-&gt;user = $user;
  
          return $this;
      }
  
      /**
       * Get user
       *
       * @return \AppBundle\Entity\User
       */
      public function getUser()
      {
          return $this-&gt;user;
      }
  
      /**
       * Set createdAt
       *
       * @param datetime $createdAt
       */
      public function setCreatedAt($createdAt)
      {
          $this-&gt;createdAt = $createdAt;
      }
  
      /**
       * Get createdAt
       *
       * @return datetime
       */
      public function getCreatedAt()
      {
          return $this-&gt;createdAt;
      }
  }
  </code></pre>
  
  <p>And when i try to insert some values with this : </p>
  
  <pre><code>public function loadCategorie(ObjectManager $manager, $user)
  {
      $aLib = array('Categ1','Categ2','Categ3','Categ4','Categ5','Categ6','Categ7');
  
      foreach($aLib as $catP)
      {
          $cat = new Categorie();
          $cat-&gt;setLibelle("[".$user-&gt;getUsername()."] ".$catP);
          $cat-&gt;setUser($user);
          $manager-&gt;persist($cat);
      }
      $manager-&gt;flush();
  }
  </code></pre>
  
  <p>I have this error : </p>
  
  <p>[Doctrine\DBAL\Exception\NotNullConstraintViolationException]
    An exception occurred while executing 'INSERT INTO categorie (Libelle, created_at, user_id) VALUES (?, ?, ?)' with
    params ["[cyriladmin] Categ1", null, 1]:
    <strong>SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'created_at' cannot be null</strong></p>
  
  <p>any ideas ?</p>