Doctrine2

There are two ways of setting default values for Doctrine2 entities.

The way I was familiar with is just to define your default value in construct of your entity.

The other way adding default value to your entity is through schema. Now this differs if you use annotations, xml or php. I’m going to give you example for xml.

So the same thing you define your AcmeEntity.orm.xml

This just goes to show no matter how many times you go over Doctrine2 documentation there is always something new to learn.