3 ms·
I despise django-orm, doctrine is so much better. Like, who thought that using named arguments to do stuff was a proper way ??? `.filter(created_at__gte=XXXXX)`
by Oxodao 2mo ago
I despise django-orm, doctrine is so much better. Like, who thought that using named arguments to do stuff was a proper way ??? `.filter(created_at__gte=XXXXX)` why? The rest of the framework is great but the ORM is definetly its weakest point.
- JodieBenitez 2mo agoHaving used Doctrine, hard disagree. Never again.
- Oxodao 2mo agoI've used django-orm at my previous job for 2 years and I never have liked it, the syntax is just not nice to read. I used Doctrine for 5 years (2 before last job and 3 since I got my current one) and it's just night and day. Declaring entity is just way cleaner, you can just skim through an EntityRepository / query and understand easily what it does
- zelphirkalt 2mo agoI find those double underscore kwargs weird too, and would prefer to simply pass a lambda instead. What is your idea, what would you suggest?
- ErroneousBosh 2mo agoThe double underscore kwargs are a bit odd, I agree, but once you know about them they're okay. And, rather like the petrol engine, it turns out while it sucks, everything else is massively worse in some vitally important way.
- Oxodao 2mo agoIn Doctrine the query builder can take objects that describe what you want to do [1], not the best but still way better to read and understand. There's also the DQL which is an SQL-like language that's pretty well integrated in phpstorm and is quite close to SQL [2] [1] https://www.doctrine-project.org/projects/doctrine-collections/en/3.1/expression-builder.html https://www.doctrine-project.org/projects/doctrine-collectio... (for collections but you can use them for queries too) [2] https://www.doctrine-project.org/projects/doctrine-orm/en/3.6/reference/query-builder.html https://www.doctrine-project.org/projects/doctrine-orm/en/3.... / https://www.doctrine-project.org/projects/doctrine-orm/en/3.6/reference/dql-doctrine-query-language.html https://www.doctrine-project.org/projects/doctrine-orm/en/3....