Hello,
I'm quite new to symfony. I would like to use Timastampable to fill date_created and date_updated fields in my base bue I get an error when I try to load fixtures.
here are my fields (from my entity).
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 [PDOException] SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'date_added' c annot be null
apparently I can call Gedmo and Timestamable but it doesn't send any date :/
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 /** * @var \DateTime * * @ORM\Column(type="datetime") * @gedmo\Timestampable(on="create") */ private $date_added; /** * @var \DateTime * * @ORM\Column(type="datetime") * @gedmo\Timestampable(on="update") */ private $date_modified;
Can someone help me whit this ?
Thanks ahead. I searched for hours on the internet...
Thomas
Partager