> SQL is much more versatile and flexible than objects/structs
SQL isn't even turing complete. How can it be more versatile and flexible than your programming language of choice?
> How would you expect an ORM to generate a "dense" query like this with it's simplistic view of things ?
In SQLAlchemy,
cls.query.filter(<some_condition_on_another_field>).update(dict(one_field=value))
I'm not sure it would work though. One of the problems I see is inherent with code generation approach: what happens when you had to modify the generated code and then changed your meta-model and want to regenerate the model again ?
Besides, the problem of "fitting square pigs in a round hole" would remain: SQL is much more versatile and flexible than objects/structs: you simply can't just work with the a table=an object abstraction, which tends to yield inefficient database queries and/or headaches from the developers side. Example:
How would you expect an ORM to generate a "dense" query like this with it's simplistic view of things ?The same applies for the select queries, especially for reporting and data aggregation needs, where you would select some columns from multiple tables, possibly with formulas and computed columns.