How do I insert/update null values in date columns in Doctrine2?
I’ve set the date column to nullable=true.
/**
* @ORM\Column(type="date", nullable=true)
*/
private $dateBar;
And I’ve tried this:
$foo->setDateBar(new \DateTime()); // Inserts today's date
$foo->setDateBar(); // Throws error
I couldn’t find anything in the doctrine2’s documentation either.
I’m guessing that your setDateBar always expects a parameter? Try:
If that is not the problem then please post your error message.