Doctrine syntax error with field named "order" Doctrine syntax error with field named "order" symfony symfony

Doctrine syntax error with field named "order"


The problem is order being a reserved word in MySQL. If you are using doctrine you can tell it to escape reserved words in the mapping like so:

/** @Column(name="`order`", type="integer") */private $order;

http://docs.doctrine-project.org/en/latest/reference/basic-mapping.html#quoting-reserved-words