Hibernate Tips: How to Handle NULL Values while Ordering Query Results in JPQL
|

Hibernate Tips: How to Handle NULL Values while Ordering Query Results in JPQL

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 leave a comment below. Question: I need to order the result of a JPQL query based on a column that contains NULL values. How…

Hibernate Tips: What’s the best way to persist a ZonedDateTime

Hibernate Tips: What’s the best way to persist a ZonedDateTime

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 leave a comment below. Question: During last week’s Hibernate workshop, I got a few questions about Hibernate’s handling of ZonedDateTime objects. To sum them…

5 Common Hibernate Mistakes That Cause Dozens of Unexpected Queries
|

5 Common Hibernate Mistakes That Cause Dozens of Unexpected Queries

If there is one thing that’s often criticized about JPA and Hibernate, it’s that it sometimes execute more queries than you expected. And I’m not talking about 1 or 2 additional queries. I’m talking about dozens or even hundreds of them. The worst thing about it is that you don’t recognize that problem if you…