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…

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…