php - Assign a default value to a variable symfony2 annotation -
php - Assign a default value to a variable symfony2 annotation -
this question has reply here:
doctrine 2.1 - datetime column default value 4 answershow can assign (cuurent_time) default value variable ($dateajout)
/** * @var \datetime * * @orm\column(name="dateajout", type="datetime" , nullable=true) */ private $dateajout;
have tried this:
class dummy { /** * @var \datetime * * @orm\column(name="dateajout", type="datetime" , nullable=true) */ private $dateajout; public function __construct() { $this->dateajout = new \datetime(); } }
?
php doctrine2
Comments
Post a Comment