Hibernate Tip: How to control cache invalidation for native queries

Hibernate Tip: How to control cache invalidation for native queries

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: “I was told that native queries remove all entities from my 2nd level cache. But you’re still recommending them….

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….