Using hint from Craig's Tag module I figure I need to use the ORM and Gedmo namespace with
Code
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Mapping\Annotation as Gedmo;
Then I tried to declare a Timestampable field in my entity with the annotation
Code
/**
* @ORM\Column(type="date")
* @Gedmo\Timestampable(on="create")
*/
protected $created_at;
* @ORM\Column(type="date")
* @Gedmo\Timestampable(on="create")
*/
protected $created_at;
When I create a new instance of the entity class and try to persist it, there's an SQL error
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'created_at' cannot be null
If I remove the created_at field from my entity definition then it works fine. Apparently the Timestampable behavior isn't working and the created_at field is left null before the persisting. I tried Translatable too, it doesn't work either (no translation table is created as can be confirmed by looking at the output of schemaTool::getCreateSchemaSql()).
What am I doing wrong? I don't think there's a problem with the availability of the namespaces since they popup in codecompletion in my IDE and Apache didn't complain.
