So, I\'m still REALLY new to symfony but i\'m learning quickly... I created an entity and a crud (i forget how I did it actually but it was via the command line)..
Set your default values directly in the entity file:
/**
* @var varchar $totaltime
*/
private $totaltime = null;
Then add to your yml file:
totaltime:
type: string
nullable: TRUE
Then something like:
php app/console doctrine:schema:update --dump-sql
To update the database.
However, you really need to slow down and work you way through the examples in the manual. Guessing at how you did things is really not going to get you very far.
I've just been looking for the solution, and wasn't happy with the accepted solution. [Edit: though I now know it's because I was using annotation]. The way I've found that works for me is setting nullable:
/**
* @ORM\Column(type="varchar", nullable=true)
*/
private $totaltime = null;