Hibernate @mybatis, #ObjectRelationalMapperOrm
We needed a performant ORM that wouldn't add too much magic or complex intermediate layers.
Hibernate is a very mature tool, but it's gone too far in abstracting OOP from relational databases. It works nicely for simple CRUD operations and it's integration with Spring is fantastic. Its biggest downside, in our opinion, is when it comes to complex queries from several tables. For these cases it normally requires using HQL or other proprietary query building mechanisms.
MyBatis provides a very lightweight and mature ORM. We prefer it over Hibernate because:
It doesn't add an extra layer of complexity, you can either ask MyBatis Generator to generate the SQL queries for you, or write your own SQL
Writing SQL can be cumbersome, but with it you have great, standard mechanisms of optimization and can execute queries directly to a slave of your production DB to measure performance and improve it if needed.
Its integration with Spring is very straightforward nowadays. You can use annotation based DAOs and the mappers between fields and columns are automatic if you respect the naming conventions in both sides.
In general we feel that with MyBatis we can have a better development experience, easier to tune-up queries, zero boilerplate and a simplified integration test platform.
