News for hackers. Stuff that matters.
Re:Databases always have a schema (2018) by overgard on Monday February 25, 2019 @01:17PM (#19247911)
I agree although I think the biggest problem with ORMs is they’re super hard to debug and reason about. You get all kinds of awful SQL out of them you might not expect
Re:Databases always have a schema (2018) by threeseed on Monday February 25, 2019 @05:29PM (#19250090)
I've been using ORMs for nearly 20 years going back to WebObjects days.

Have never seen, not once, any ORM that doesn't make it trivial to print out the SQL to help with debugging the generated code. And I've never found it particular hard to reason about especially given many ORMs tend to stick to pretty vanilla SQL.

Re:Databases always have a schema (2018) by overgard on Tuesday February 26, 2019 @11:22PM (#19260848)
Sure you can print it out, but if your data isn’t particularly normalised (which there are good reasons not to do that), it can get gross real quick. The alternative is just manually serialising/deserialising, which is verbose of course but a lot easier to debug.
Re:Databases always have a schema (2018) by Daishiman on Monday February 25, 2019 @08:15PM (#19251201)
This is a tired point and in a decade of using ORMs this hasn't been the case, ever.
Re:Databases always have a schema (2018) by overgard on Tuesday February 26, 2019 @11:19PM (#19260835)
As someone else mentioned, the fact that this is a tired point actually bolsters my argument; I’m not exactly the first person to run into this. Table rows and objects just aren’t the same thing and you get really leaky abstractions treating them as such.
Re:Databases always have a schema (2018) by jayd16 on Tuesday February 26, 2019 @11:38AM (#19255773)
Why do you think the comment is so common if it was never the case?
Re:Databases always have a schema (2018) by Izkata on Wednesday February 27, 2019 @02:26PM (#19266149)
Missing knowledge / lack of documentation. Django for example has a couple ways to see the SQL, but the most useful one (generating it from a specific QuerySet) I can't find in the documentation - I only know about it from an answer on StackOverflow.