4 ms·
A few examples of the magic and the implicit rules that leads to confusion: query(object1).where(object1.prop=10).orderby(prop).join(object2).where(object1.pro
by greatgib 6y ago
A few examples of the magic and the implicit rules that leads to confusion:
query(object1).where(object1.prop=10).orderby(prop).join(object2).where(object1.prop=object2.bar)
Looks like to be logical blocks that you can easily chain together, but is the order important and can each "subfunction" be used anywere? or after a specific previous one? Probably join couldn't be used after orderby.
What is the state before the join, the available tables?
Where inside the sql will be applied the where? What object will be available?
Some ORM even do kind of "autojoin" on table that it detects based on arguments used in later where clauses.