Let’s dive into the mess that we get ourselves into when naively relying on JPA and its implementations and see how to generate nothing else but SQL statements that spark joy!
Spring Data, JPA, Hibernate got our backs though to avoid messy database access, right? HELL NO! All they do is teach you a lesson to not rely on other systems without verifying the fundamentals functioning as expected yourself! There is tradeoffs with every framework and you do not want to iron out those kinks in production.
We will look at common anti-patterns that we tend to apply when relying on the JPA-ecosystem and how to regain control over the database layer of your applications again.