Hibernate Tip: How to customize the association mappings using a composite key

Hibernate Tip: How to customize the association mappings using a composite key

Hibernate Tips is a series of posts in which I describe a quick and easy solution for common Hibernate questions. If you have a question for a future Hibernate Tip, please post a comment below. Question: “One of my entities uses an @IdentityClass to map a composite primary key, and I need to map a…

6 Hibernate Mappings You Should Avoid for High-Performance Applications

6 Hibernate Mappings You Should Avoid for High-Performance Applications

Hibernate provides lots of mapping features that allow you to map complex domain and table models. But the availability of these features doesn’t mean that you should use them in all of your applications. Some of them might be a great fit for smaller applications that are only used by a few users in parallel….

Using the Optimal Query Approach and Projection for JPA and Hibernate

Using the Optimal Query Approach and Projection for JPA and Hibernate

Using JPA and Hibernate, you can choose between various ways to query your data, and each of them supports one or more kinds of projections. That provides you with lots of options to implement your persistence layer. But which one fits your use case? And which one should you avoid if you want to optimize…