What are the use cases for an ORM like Hibernate? I've worked in fairly complex domains, an I'd rather just use a lightweight library and write the SQL myself. Typing out SQL queries is easier than, for example, using the JPA mappings and Spring Data JPA query format.
That is the right approach. We were sucked in by the claims that Hibernate would make life “easier”, with the idea that we could represent everything in Java. This was very appealing.
I think another factor was that for a while, databases were seen as a necessary evil, rather than the beating heart of our application (see also: NoSQL). Working in a “real” language was seen as better than working with this messy data thing. The whole “impedance mismatch” nonsense.
(I’m not defending our decision, which in hindsight was wrong and stupid. just trying to explain it.)
Seconding: databases as an "implementation detail" is pretty wrong. If you're writing a basic CRUD app you can get away with it, and in fairness this is a lot of cases. But as soon as you start saying things like "how do we lock rows" or "let's put 10M rows in this table" you really need to write the SQL yourself, because at this point you don't have a software application, you have a data application.