3 ms·
No, good ORMs are awesome. As their name says, the primarily map objects and object-trees to relational database tables both ways. They provide a standardized a
by andix 3y ago
No, good ORMs are awesome. As their name says, the primarily map objects and object-trees to relational database tables both ways. They provide a standardized and type safe way to do so.
They often include a query builder that generated SQL. An important feature for an ORM is, that you can inspect the generated SQL and that you are also able to use them with SQL queries. Some ORMs even let you mix SQL into their generated queries.
Generating code or generating database schemas from code is also a common feature, including migrations. It may satisfy your need, or it may not. So use it, or don't use it. It should be easy to change the strategy at any point.
The big mistakes only happen if the developers think they don't have to know or care about SQL anymore. That's just wrong, because an ORM is just a tool to work with a SQL database. Like the Tesla Autopilot, it helps you drive in many situations, but you still need to know how to drive, supervise it all the time and correct it in many situations.