Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.
If you want to call SQL functions from the
SELECT clause of a JPQL or Criteria API queries,
then you should register the function as otherwise, the entity query will not compile.
For more details about the best way to register such SQL function, check out
shows that collection EAGER fetching can lead to N+1 query problems.
However, this can happen not only to entity collections. You can bump into this issue with
associations as well since they are fetched eagerly by default too.
The best way to address the N+1 query issue is to detect it automatically during testing, as explained
in this article.
For our Russian readers, there is a very good article on Habr which addresses many topics that are very useful when using JPA and Hibernate.
If you want to customize the default mapping between JPA entities and database columns, you can use a custom naming strategy. This article explains how you can do that with both Hibernate 4 and 5.
If you are using Hazelcast as a Hibernate 2nd-level cache provider, and you are running on Java 10, check out this article for how to set up your project dependencies in Maven so that everything works properly.
The Java Magazine features one article about some design patterns to consider when using JPA and Hibernate.
Time to upgrade
If you are using Hibernate Validator 6.0, you might want to upgrade to the 6.0.11 version which comes with improved compatibility with JDK 11 and a couple of bug fixes.
Questions and answers
Parent-side Hibernate collection does not contain any child record
How to fetch one side of a many-to-many association while filtering the other using Hibernate
How can I avoid the Warning “firstResult/maxResults specified with collection fetch; applying in memory!”?
Solve Hibernate Lazy-Init issue with hibernate.enable_lazy_load_no_trans
JPA lazy fetch not working and throwing LazyInitializationException
How to update only a part of all entity attributes with Hibernate
When to use EntityManager.find() vs EntityManager.getReference() with JPA