Why, When and How to Use DTO Projections with JPA and Hibernate
|

Why, When and How to Use DTO Projections with JPA and Hibernate

DTOs are easy to use and the most efficient projection for read-only operations. So, whenever you don’t need to change the requested information, you should prefer a DTO projection. But what exactly is a DTO? How does such a projection work with Hibernate? And how can you use it in your queries? I will answer…

Access Strategies in JPA and Hibernate – Which is better, field or property access?
|

Access Strategies in JPA and Hibernate – Which is better, field or property access?

The access strategy defines how your JPA implementation, e.g., Hibernate or EclipseLink, access your entity attributes. You can choose between field-based access and property-based access: If you use field-based access, your JPA implementation uses reflection to read or write your entity attributes directly. It also expects that you place your mapping annotations on your entity attributes….

5 Things Beginners Need to Know Before Using JPA / Hibernate / EclipseLink
|

5 Things Beginners Need to Know Before Using JPA / Hibernate / EclipseLink

A solid understanding of JPA and its implementations is still one of the most in-demand skills among Java developers. So, it’s no surprise that there are several blog posts, books, and courses available that teach you how to implement a persistence layer using the JPA specification. I even recorded a JPA for Beginners course myself. But…