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…

Hibernate Tip: Difference between @JoinColumn and @PrimaryKeyJoinColumn

Hibernate Tip: Difference between @JoinColumn and @PrimaryKeyJoinColumn

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: Himanshu Srivastava asked today’s question on my YouTube channel: “What’s the difference between@JoinColumn and @PrimaryKeyJoinColumn? Also, should we use…

The Builder Pattern – How to use it with Hibernate

The Builder Pattern – How to use it with Hibernate

When I shared last week’s article about implementing the fluent interface pattern on twitter, I got asked about using the builder pattern for your entities. Implementing the builder pattern for your entities can massively improve the readability of your business code. In contrast to the fluent interface pattern, there is nothing in the JPA specification…