https://docs.jboss.org/hibernate/stable/orm/userguide/html_s...
> using setter of an instance shouldn't update in database by default omg
This doesn't happen.. the database won't update until you ask the entity manager to persist the entity.
> I've seen one project where transaction leaked to Jackson!! Jackson was calling getters on fields and executing DB queries. JSON ended up as 2.6Mb instead list of 10 fields.
I suspect you might not agree, but JPA lazy loading is one of the easiest concepts to understand. However, I'd argue that leaking your database models to the view is a mistake to begin with and said application is already incorrect.
> If in any doubt, refer to JOOQ - it's the SQL-oriented ORM for Java.
Both the author/maintainer of jOOq and Hibernate agree that each has their place.
I really am amazed at developers that don't take the time to learn about the tools they use.