Doctrine2: CHAR with annotations

Posted November 7th, 2012 in Razno and tagged , , by Metod

Ever wondered if there is a better way of defining a CHAR (mysql) with doctrine2 annotations?

From doctrine2 docs:

Not a very nice approach imo. I dug around the code and found a somewhat neater solution:

Now you don't need to manually type in column definitions. Enjoy!