title: Symfony2 - StofDoctrineExtensionBundle
body: <p>I have installed the StofDoctrineExtensionsBundle and am having trouble getting it to work.</p>
  
  <p>Here is my composer.json config:</p>
  
  <pre><code>.....
  "require": {
      "php": "&gt;=5.3.3",
      "symfony/symfony": "2.2.*",
      "doctrine/orm": "~2.2,&gt;=2.2.3",
      "doctrine/doctrine-bundle": "1.2.*",
      "twig/extensions": "1.0.*",
      "symfony/assetic-bundle": "2.1.*",
      "symfony/swiftmailer-bundle": "2.2.*",
      "symfony/monolog-bundle": "2.2.*",
      "sensio/distribution-bundle": "2.2.*",
      "sensio/framework-extra-bundle": "2.2.*",
      "sensio/generator-bundle": "2.2.*",
      "jms/security-extra-bundle": "1.4.*",
      "jms/di-extra-bundle": "1.3.*",
      "friendsofsymfony/user-bundle": "*",
      "doctrine/doctrine-migrations-bundle": "dev-master",
      "stof/doctrine-extensions-bundle": "~1.1@dev"
  },
  ....
  </code></pre>
  
  <p>I have added the bundle in my appKernel:</p>
  
  <p><code>new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),</code></p>
  
  <p>I have added the following to my config.yml:</p>
  
  <pre><code>stof_doctrine_extensions:
      default_locale: en_US
      orm:
          default:
              sluggable: true
              sortable: true
  </code></pre>
  
  <p>Here is my Entity:</p>
  
  <pre><code>&lt;?php
  
  namespace SixString\PearBundle\Entity;
  
  use Gedmo\Mapping\Annotation as Gedmo;
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="icon")
   * @ORM\HasLifecycleCallbacks()
   */
  class Icon
  {
  
  ....(other properties and getters/setters)
  
  /**
   * @var \datetime $created
   *
   * @Gedmo\Timestampable(on="create")
   * @ORM\Column(type="datetime")
   */
  protected $created;
  
  /**
   * @param \datetime $created
   */
  public function setCreated($created)
  {
      $this-&gt;created = $created;
  }
  </code></pre>
  
  <p>In my controller I have:</p>
  
  <pre><code>/**
   * @Route("/admin/go")
   */
  public function goAction(){
  
      $icon = new \SixString\PearBundle\Entity\Icon();
      $icon-&gt;setName("shawn");
      $icon-&gt;setZip(12345);
      $icon-&gt;setType("go");
  
      $em = $this-&gt;getDoctrine()-&gt;getManager();
      $em-&gt;persist($icon);
      $em-&gt;flush();
  }
  </code></pre>
  
  <p>When I load /admin/go I receive the following error:</p>
  
  <pre><code>An exception occurred while executing 'INSERT INTO icon (name, zip, thumb, created, updated, createdBy_id) VALUES (?, ?, ?, ?, ?, ?)' with params ["shawn", 12345, "go", null, null, null]:
  
  SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'created' cannot be null 
  </code></pre>
  
  <p>I am not sure if I am missing a step or configuration but I have read through the documentation a few times and do not see anything.</p>