Answer the question
In order to leave comments, you need to log in
How to escape table name in doctrine2?
I think this question has been asked before, but I couldn't find an answer.
MySQL database has an Order table. It cannot be renamed within a project. It must be exactly Order.
In Doctrine, an entity is described like this:
/**
* @ORM\Entity
* @ORM\Table(name="`Order`")
*/
class Order {
.....
You have syntax error near 'Order add invoice_id int default null
Answer the question
In order to leave comments, you need to log in
This is a very old problem of doctrine.
Alternatively, you can use a similar solution for auto-escaping:
https://gist.github.com/Thinkscape/6713196
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question