Skip to main content

Micha Kops: Creating slim Database Projections using JPA2 Constructor Expressions

One common question that you may encounter when using object-relational-mapping in your application is how to slim down data that you’re retrieving from the persistence layer to a specific subset for your use-case in an efficient manner and without using complex additional mapping frameworks. In some situations you might declare lazy loaded fields but another approach is JPA2 constructor expressions...

Community: