You already know I dislike JPA because it gives us too many different shotguns and allows us to become swiss cheese.
I also dislike the “one entity per table” approach that JPA enforces, because tables can be used differently, depending on the current business usecase (domain) that is being developed.
I do not believe that “one entity per table” is bad, I’m arguing that it is nuanced.
I have started reading about Spring Data JDBC, and I believe this is closer to what i would like an ORM to do.
Links about this topic:
Has a nice example (
Rental Company), and explains the concept of Aggregate root. Shows differences between Spring JDBC, Spring Data JDBC and Spring Data JPA
Check the portion about rollbacks in 2022-05. It is empty in 2022-01.