symfony / demo

Symfony Demo Application
https://symfony.com/
MIT License
2.47k stars 1.61k forks source link

Question: Doctrine columns order #1438

Closed Mecanik closed 1 year ago

Mecanik commented 1 year ago

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:

id|title|description|user_id

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 this demo, somehow this is magically solved. Any entity/table created always arranges the id fields in the proper order.

So the above results in:

id|user_id|title|description

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.

derrabus commented 1 year ago

Hello.

This is the issue tracker for the Symfony Demo application and not a public support forum. Please post your question either on StackOverflow or one of these discussion boards.