title: Gedmo Timestampable (on update create)
body: <p>i have a strange problem with the <a href="https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/symfony2.md" rel="nofollow">DoctrineExtensions Bundle</a>.</p>
  
  <p>I finish the installation and im getting no errors.</p>
  
  <p>But my "update" and "create" Event not working.</p>
  
  <p>Entity:</p>
  
  <pre><code> Use Gedmo\Mapping\Annotation as Gedmo;
   use Doctrine\ORM\Mapping as ORM;
  
  /**
   * Price
   *
   * @ORM\Table()
   * @ORM\Entity(repositoryClass="pspiess\LetsplayBundle\Entity\PriceRepository")
   */
  class Price {
  
  
      public function __construct() {
          //$this-&gt;created = new \DateTime();
      }
  
      /**
       * @var integer
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      /**
       * 
       * @var \Doctrine\Common\Collections\ArrayCollection $fields
       * 
       * @ORM\ManyToMany(targetEntity="pspiess\LetsplayBundle\Entity\Field", mappedBy="prices")
       * */
      protected $fields;
      protected $field;
  
      /**
       * @var decimal
       *
       * @ORM\Column(name="price", type="decimal", precision=9, scale=2)
       */
      private $price;
  
      /**
       * @var integer
       *
       * @ORM\Column(name="weekdayfrom", type="smallint", nullable=true)
       */
      private $weekdayfrom;
  
      /**
       * @var integer
       *
       * @ORM\Column(name="weekdayto", type="smallint", nullable=true)
       */
      private $weekdayto;
  
      /**
       * @var string
       *
       * @ORM\Column(name="indentifier", type="string", length=255)
       */
      private $indentifier;
  
      /**
       * @var \DateTime
       *
       * @ORM\Column(name="timefrom", type="time")
       */
      private $timefrom;
  
      /**
       * @var \DateTime
       *
       * @ORM\Column(name="timeto", type="time")
       */
      private $timeto;
  
      /**
       * @var string
       *
       * @ORM\Column(name="note", type="text", nullable=true)
       */
      private $note;
  
      /**
       * @var datetime $created
       *
       * @Gedmo\Timestampable(on="create")
       * @ORM\Column(type="datetime")
       */
      private $created;
  
      /**
       * @var \DateTime
       * @Gedmo\Timestampable(on="update")
       * @ORM\Column(name="changed", type="datetime")
       */
      private $changed;
  
      /**
       * Get id
       *
       * @return integer 
       */
      public function getId() {
          return $this-&gt;id;
      }
  
      /**
       * Set price
       *
       * @param integer $price
       * @return Price
       */
      public function setPrice($price) {
          $this-&gt;price = $price;
  
          return $this;
      }
  
      /**
       * Get price
       *
       * @return integer 
       */
      public function getPrice() {
          return $this-&gt;price;
      }
  
      /**
       * Set weekdayfrom
       *
       * @param integer $weekdayfrom
       * @return Price
       */
      public function setWeekdayfrom($weekdayfrom) {
          $this-&gt;weekdayfrom = $weekdayfrom;
  
          return $this;
      }
  
      /**
       * Get weekdayfrom
       *
       * @return integer 
       */
      public function getWeekdayfrom() {
          return $this-&gt;weekdayfrom;
      }
  
      /**
       * Set weekdayto
       *
       * @param integer $weekdayto
       * @return Price
       */
      public function setWeekdayto($weekdayto) {
          $this-&gt;weekdayto = $weekdayto;
  
          return $this;
      }
  
      /**
       * Get weekday
       *
       * @return integer 
       */
      public function getWeekdayto() {
          return $this-&gt;weekdayto;
      }
  
      /**
       * Set indentifier
       *
       * @param string $indentifier
       * @return Price
       */
      public function setIndentifier($indentifier) {
          $this-&gt;indentifier = $indentifier;
  
          return $this;
      }
  
      /**
       * Get indentifier
       *
       * @return string 
       */
      public function getIndentifier() {
          return $this-&gt;indentifier;
      }
  
      /**
       * Set timefrom
       *
       * @param \DateTime $timefrom
       * @return Price
       */
      public function setTimefrom($timefrom) {
          $this-&gt;timefrom = $timefrom;
  
          return $this;
      }
  
      /**
       * Get timefrom
       *
       * @return \DateTime 
       */
      public function getTimefrom() {
          return $this-&gt;timefrom;
      }
  
      /**
       * Set timeto
       *
       * @param \DateTime $timeto
       * @return Price
       */
      public function setTimeto($timeto) {
          $this-&gt;timeto = $timeto;
  
          return $this;
      }
  
      /**
       * Get timeto
       *
       * @return \DateTime 
       */
      public function getTimeto() {
          return $this-&gt;timeto;
      }
  
      /**
       * Set note
       *
       * @param string $note
       * @return Price
       */
      public function setNote($note) {
          $this-&gt;note = $note;
  
          return $this;
      }
  
      /**
       * Get note
       *
       * @return string 
       */
      public function getNote() {
          return $this-&gt;note;
      }
  
      /**
       * Get created
       *
       * @return \DateTime 
       */
      public function getCreated() {
          return $this-&gt;created;
      }
  
      /**
       * Set changed
       *
       * @param \DateTime $changed
       * @return Price
       */
      public function setChanged($changed) {
          $this-&gt;changed = $changed;
  
          return $this;
      }
  
      /**
       * Get changed
       *
       * @return \DateTime 
       */
      public function getChanged() {
          return $this-&gt;changed;
      }
  
      /**
       * Add field
       *
       * @param \pspiess\LetsplayBundle\Entity\Field $field
       * @return Price
       */
      public function addField(\pspiess\LetsplayBundle\Entity\Field $field) {
          $this-&gt;fields[] = $field;
  
          return $this;
      }
  
      /**
       * Remove field
       *
       * @param \pspiess\LetsplayBundle\Entity\Field $field
       */
      public function removeField(\pspiess\LetsplayBundle\Entity\Field $field) {
          $this-&gt;fields-&gt;removeElement($field);
      }
  
      /**
       * Get field
       *
       * @return \Doctrine\Common\Collections\Collection 
       */
      public function getField() {
          return $this-&gt;fields;
      }
  
      /*
       * @return string
       */
  
      public function __toString() {
          return $this-&gt;getIndentifier();
      }
  
  }
  </code></pre>
  
  <p>My Config.yml</p>
  
  <pre><code>orm:
      auto_generate_proxy_classes: "%kernel.debug%"
      auto_mapping: true
  
      mappings:
          translatable:
              type: annotation
              alias: Gedmo
              prefix: Gedmo\Translatable\Entity
              # make sure vendor library location is correct
              dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Translatable/Entity"
          loggable:
              type: annotation
              alias: Gedmo
              prefix: Gedmo\Loggable\Entity
              dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Loggable/Entity"
          tree:
              type: annotation
              alias: Gedmo
              prefix: Gedmo\Tree\Entity
              dir: "%kernel.root_dir%/../vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity"
  </code></pre>
  
  <p>My doctrine_extensions.yml</p>
  
  <pre><code>services:
      # KernelRequest listener
      extension.listener:
          class: pspiess\AppBundle\Listener\DoctrineExtensionListener
          calls:
              - [ setContainer, [ @service_container ] ]
          tags:
              # translatable sets locale after router processing
              - { name: kernel.event_listener, event: kernel.request, method: onLateKernelRequest, priority: -10 }
              # loggable hooks user username if one is in security context
              - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }
  
  
      # Doctrine Extension listeners to handle behaviors
      gedmo.listener.tree:
          class: Gedmo\Tree\TreeListener
          tags:
              - { name: doctrine.event_subscriber, connection: default }
          calls:
              - [ setAnnotationReader, [ @annotation_reader ] ]
  
      gedmo.listener.translatable:
          class: Gedmo\Translatable\TranslatableListener
          tags:
              - { name: doctrine.event_subscriber, connection: default }
          calls:
              - [ setAnnotationReader, [ @annotation_reader ] ]
              - [ setDefaultLocale, [ %locale% ] ]
              - [ setTranslationFallback, [ false ] ]
  
      gedmo.listener.timestampable:
          class: Gedmo\Timestampable\TimestampableListener
          tags:
              - { name: doctrine.event_subscriber, connection: default }
          calls:
              - [ setAnnotationReader, [ @annotation_reader ] ]
  
      gedmo.listener.sluggable:
          class: Gedmo\Sluggable\SluggableListener
          tags:
              - { name: doctrine.event_subscriber, connection: default }
          calls:
              - [ setAnnotationReader, [ @annotation_reader ] ]
  
      gedmo.listener.sortable:
          class: Gedmo\Sortable\SortableListener
          tags:
              - { name: doctrine.event_subscriber, connection: default }
          calls:
              - [ setAnnotationReader, [ @annotation_reader ] ]
  
      gedmo.listener.loggable:
          class: Gedmo\Loggable\LoggableListener
          tags:
              - { name: doctrine.event_subscriber, connection: default }
          calls:
              - [ setAnnotationReader, [ @annotation_reader ] ]
  </code></pre>
  
  <p>I dont know what im doing wrong here...</p>