ORMs ease out the pain of writing the data access layer by ourselves. But, have you ever come across a situation where an ORM is not suitable to do it's job?
For further actions, you may consider blocking this person and/or reporting abuse
ORMs ease out the pain of writing the data access layer by ourselves. But, have you ever come across a situation where an ORM is not suitable to do it's job?
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (6)
I was also struggling with that question.
I feel like for simple crud an orm is great and it doesn't add overhead.
If you complex relations and joins etc, maybe you should write the queries.
For complex tasks, functions and procedures are handy. But ORMs build the database from scratch. Do ORMs allow functions, procedures..? π€
I think yes. In some frameworks you can call a Procedure e.g. as a method with parameters and an output and then call it.
For example in java with
spring-data-jpa(compination of Hibernate and Jpa) you can do something like this:source: logicbig.com/tutorials/spring-fram...
Also, I do not think it's wise to let ORM to build up your database (at least your production db). To build up a database, try better a migration tool.
I guess some ORM's cannot do some complex tasks. In that case should we not use an ORM and use raw SQL OR use raw sql for the entire project?