4 ms·
Your second paragraph reads more like you are talking about query builders rather than anything in the domain of ORM. ORM happens after the query has executed a
by randomdata 3y ago
Your second paragraph reads more like you are talking about query builders rather than anything in the domain of ORM. ORM happens after the query has executed and you have a relation already in hand. Everything that happens before the relation is made available is outside of the ORM purview.
Some ORM toolkits bundle query builders as a secondary feature, but they are still logically distinct features.
- itsdrewmiller 3y agoThe only reason ORMs are relevant to this conversation at all is because they include query generation. The vast majority for popular ones do that - one that I know of that doesn’t (dapper) labels itself a “micro ORM” because of it.
- deleted 3y ago[deleted]
- randomdata 3y agoORM never includes query generation. Some libraries often include both ORM toolkits and query builders, but that's like calling sorting 'encryption' because libraries often include functionality for both. That would be quite silly, and confusing for the reader.
- simonw 3y agoEvery ORM I've ever used (or contributed to building) has included a query builder as a core component. What ORMs have you seen that don't do that?
- randomdata 3y agoORM is the act of mapping relations (sets of tuples) to objects (graph structures). How could query building be a part of that? There are ORM toolkits that help produce the code to perform that mapping to save you from doing it by hand (although you can do it by hand, if you so wish!), but not even they could shove query building in the middle. Query execution has to happen before ORM can take place. You cannot perform ORM until you have the relation already in hand. (Mutation cases are in reverse, but I know you are capable of understanding that without it spelt out in detail) What would it even mean for ORM to include query building? If I'm reading you right, you seem to be saying that database helper libraries often include both query building and ORM toolkit features, usually along with other features like database migration management. Which is very much true. But why would you call one feature by the name of another? If you call query building ORM, is ORM best called database migration?
- Izkata 3y agoThe mapping is bi-directional. Query generation is object -> relation, result mapping is relation -> object.
- randomdata 3y ago> The mapping is bi-directional. "(Mutation cases are in reverse, but I know you are capable of understanding that without it spelt out in detail)" Guess you were't capable after all. How do tech people manage to be so out to lunch all the time?
- Izkata 3y agoI am the 4th person you've responded to in this thread.
- randomdata 3y agoWe already know. There are little username thing-ys that communicate that. Is there something you are trying to add?
- Izkata 3y agoThis only makes sense in a back and forth with one other person: > Guess you were't capable after all.
- randomdata 3y agoNo...? The assertion about being able to understand the reverse case went out to anyone reading the comment. This is clearly a community forum, not some kind of private messaging system. Comments are not directed towards anyone in particular. Stop and think. If you actually did somehow mistakenly believe it was a one-on-one with another person, why would you but your head into the conversation? That would be completely illogical. There is a curious contraction here.
- deleted 3y ago[deleted]