2 ms·
I don't agree that ORMs are backwards. They often go both directions so how can it be backwards? You can usually generate schemas from your code objects as we
by jayd16 7y ago
I don't agree that ORMs are backwards. They often go both directions so how can it be backwards? You can usually generate schemas from your code objects as well as vice versa.
No, ORMs are usually solving the wrong problem entirely. Your code objects and your schema are solving different problems and should not be directly mapped.
As for other things they do...In my opinion, they usually ruin the declarative beauty of SQL by creating a lot of imperative methods, but I admit this is _mostly_ a preference thing.
That said, _I've_ never seen transactions or complex queries done properly in an ORM without simply giving up and using SQL.
But I still use a thin ORM. Who wants to write a result set parser? You just need to reason about and be aware of when you want to create an object for a custom result columns that aren't mapped to a table vs when you want to do the default ORM thing and nest table mapped objects.