Are there any ORM tools that whete it makes sense make use of stored procedures?
Are SQL produced by the best ORM solutions today generally as efficent (or more so) as that produced by the average developer?
posted 1 year ago
ORMs are about OLTP, while stored procedures are more for OLAP.
In my experience, the best support for stored procedures is what jOOQ offers.
Whenever a tool auto-generates statements for you, you need to validate that the statements are the right ones.
But then, the auto-generated statements Hibernate offer you the following benefits:
- you can enable JDBC batch updates with just a configuration.
- once you add/remove/rename a column, all the insert/update/delete statements are going to reflect that change
- you also get support for optimistic locking - you can paginate even native queries not just JPQL queries