High-Performance Java Persistence Newsletter, Issue 2

Introduction Welcome to a new issue of the High-Performance Java Persistence Newsletter in which we share articles, videos, workshops, and StackOverflow answers that are very relevant to any developer who interacts with a database system from Java.

SQL EXISTS and NOT EXISTS

Introduction In this article, we are going to see how the SQL EXISTS operator works and when you should use it. Although the EXISTS operator has been available since SQL:86, the very first edition of the SQL Standard, I found that there are still many application developers who don’t realize how powerful SQL subquery expressions really are when it comes to filtering a given table based on a condition evaluated on a different table.

How to return a Map result from a JPA or Hibernate query

Introduction In this article, I’m going to show you how you can return a Java Map result when executing a JPA query. I decided to write this article after answering a similar question on StackOverflow.

High-Performance Java Persistence Newsletter, Issue 1

Introduction I started my newsletter in November 2015, and every time I was publishing a new article, I would send it to my newsletter subscribers as well. This year, I decided to change the format of my newsletter. Instead of creating a new issue for every article, the newsletter will now contain links to the best articles I read over the past two weeks.

Multidimensional array mapping with JPA and Hibernate

Introduction In this article, I’m going to present the best way to map a Java multidimensional array when using JPA and Hibernate. While one-dimensional array types have long been supported by the Hibernate Types open-source project, starting with the 2.9 release, you can now persist multidimensional array entity attributes with JPA and Hibernate.

The best way to use a Hibernate ResultTransformer

Introduction In this article, I’m going to present the best way to use a Hibernate ResultTransformer so that you can customize the result set of a given JPA or Hibernate query. As I already explained, the Hibernate ResultTransformer is a very powerful mechanism, allowing you to customize a JPQL, Criteria API, or native SQL query result set in any possible way.