News for hackers. Stuff that matters.
Re:What ORMs have taught me: just learn SQL (2014) by normaljoe on Monday December 18, 2017 @12:44AM (#15949688)
Django's ORM is actually a good example of where identity is an issue. It lacks composite primary keys. If I have a dependent table that has my real ID, say an order number that is a varchar I have to join to the parent table to do lookups by the order number. I can't doing something like key(order_number, line_number) so I end up hydrating a parent object for operations that only require operations on the dependent objects.
Re:What ORMs have taught me: just learn SQL (2014) by nikisweeting on Monday December 18, 2017 @12:46PM (#15953527)
It doesn't have to hydrate the parent object, just use .only('relation_id').
Re:What ORMs have taught me: just learn SQL (2014) by kamyarg on Monday December 18, 2017 @07:31AM (#15951185)
an ORM does not have to solve every single problem you have, write your raw sql and run it.