Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.
Articles
Merging entities is fairly easy since you can use the merge
provided by the EntityManager
or the Hibernate Session
. However, merging collections requires more consideration, as explained by
this article.
If you are using Kotlin and want to use JPA and Hibernate for you data access layer,
this article
explains how to implement the equals()
, hashCode()
, copy()
, and toString()
methods.
This article shows you how to use a custom Hibernate naming strategy when using Spring Boot.
Every entity query, be it JPQL or Criteria API, needs to be parsed and compiled to an AST (Abstract Syntax Tree) in order to generate the associated SQL query. The entity query compilation takes time, as explained in
this article
so Hibernate provides a QueryPlanCache
to store already-compiled plans.
Starting with Hibernate 5.4, the Hibernate Statistics
object allows you to monitor the Query Plan Cache, and
this article
shows you how to take advantage of this feature to speed up IN query performance.
Time to upgrade
Hibernate OGM 5.4.0 has been released. For more details about this version, check out the release notes.
Questions and answers
-
Is the Java Hibernate framework archaic and obsolete in the age of NoSQL storage technologies?
-
How to set parentId in Child Entity of one to many mapping using Spring Boot Data JPA
-
Can I use the number sign (#) in a column name with PostgreSQL and Hibernate?
-
How to automatically serialize and deserialize JSON string using JPA and Hibernate?
-
Clarifying terminology: “Hydrating” an entity when fetching properties from the DB
-
Hibernate native SQL query type mapping from java.sql.Date to java.time.LocalDate
-
How to apply the same naming strategy to @index columnList as for column?
-
The most efficient data transfer object with Spring Data JPA