How to customize the Hypersistence Utils Jackson ObjectMapper
Introduction The Hypersistence Utils open-source project allows you to map JSON, and ARRAY when using JPA and Hibernate. Since I launched this project, one of the most wanted features was to add support for customizing the underlying Jackson ObjectMapper, and since version 2.1.1, this can be done either declaratively or programmatically. In this article, you are going to see how to customize the ObjectMapper when using the Hypersistence Utils project.
How to get the actual execution plan for an Oracle SQL query using Hibernate query hints
Introduction While answering this question on the Hibernate forum, I realized that it’s a good idea to write an article about getting the actual execution plan for an Oracle SQL query using Hibernate query hints feature.
How to map a JPA entity to a View or SQL query using Hibernate
Introduction In this article, you are going to learn how to map a JPA entity to the ResultSet of a SQL query using the @Subselect Hibernate-specific annotation.
How to cache non-existing entity fetch results with JPA and Hibernate
Introduction Sergey Chupov asked me a very good question on Twitter: https://twitter.com/scadgek/status/946838214744203269 In this article, I’m going to show you how to cache null results when using JPA and Hibernate.
JDBC Driver Connection URL strings
Introduction Ever wanted to connect to a relational database using Java and didn’t know the URL connection string? Then, this article is surely going to help you from now on.
How to use the Hibernate Query Cache for DTO projections
Introduction On the Hibernate forum, I noticed the following question which is about using the Hibernate Query Cache for storing DTO projections, not entities. While caching JPQL queries which select entities is rather typical, caching DTO projections is a lesser-known feature of the Hibernate second-level Query Cache.
A beginner’s guide to the high-performance-java-persistence GitHub repository
Introduction When I started writing High-Performance Java Persistence, I realized I needed a GitHub repository to host all the test cases I needed for the code snippets in my book, and that’s how the high-performance-java-persistence GitHub repository was born. The high-performance-java-persistence GitHub repository is a collection of integration tests and utilities so that you can test JDBC, JPA, Hibernate and jOOQ features with the utmost ease.
Hibernate HSQLDB ARRAY Type
Introduction As previously explained, although Hibernate does not support database ARRAY column types by default, you can easily implement a custom Hibernate ArrayType. While the previous solution worked on PostgreSQL, in this article, you are going to see that it is fairly easy to adapt it to HSQLDB.
JPA Criteria API Bulk Update and Delete
Introduction JPA Criteria API bulk update delete is a great feature that allows you to build bulk update and delete queries using the JPA 2.1 Criteria API support via CriteriaUpdate and CriteriaDelete. Because one of our community members asked me on the Hibernate forum about this topic, I decided it is a good opportunity to write about this lesser-known JPA Criteria API feature.
How to map a JSON collection using JPA and Hibernate
Introduction The open-source Hypersistence Utils project allows you to map Java objects or Jackson JsonNode as JPA or Hibernate entity properties, and, thanks to our awesome contributors, we have added support for storing type-safe JSON collections. In this article, you are going to see how to achieve this goal.

