Doctrine columns order #11022
-
This is a question rather than an issue, something that's been bugging me for a while. Long story short, every time I setup a fresh Symfony project and create entities/tables, when I add relation columns like User and such, the order will be something like:
And then I have to edit the entity to arrange the order and then drop the table and make another migration to maintain the order I want. With the symfony demo, somehow this is magically solved. Any entity/table created always arranges the id fields in the proper order. So the above results in:
I do not need to edit the entity and re-arrange variables and functions, I can just add on relations because it will be properly ordered. How and why? Is there some settings/package or something? Please advise. Update: Apparently after adding |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
We dont guarantee an order. Whatever comes out is right and luck if its in the order you prefer. |
Beta Was this translation helpful? Give feedback.
-
The problem description is incomprehensible to me. What exactly is your problem? Generated migration ( |
Beta Was this translation helpful? Give feedback.
We dont guarantee an order. Whatever comes out is right and luck if its in the order you prefer.