High-Performance Java Persistence Newsletter, Issue 3
Imagine having a tool that can automatically detect if you are using JPA and Hibernate properly. Hypersistence Optimizer is that tool!
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 using Java.
The pick of this edition is this Top 19 SQL-related articles published in 2019 via Learn SQL.
If you’re using a relational database system, it’s very important to understand how the database engine prevents concurrency issues. For example, this article explains how the PostgreSQL function triggers work depending on the current transaction isolation level.
The OSIV (Open-Session in View) is a terrible anti-pattern, and, if you’re using Spring Boot, you should explicitly disable OSIV. While I was aware of this issue with Spring Data JPA, Michael Simons wrote a very good article explaining why you want to disable OSIV even for Spring Data Neo4j.
CockroachDB is a globally-distributed NewSQL database that aims to provide better scalability without compromising productivity. CockroachDB implements the PostgreSQL communication protocol, so you can use an existing PostgreSQL JDBC Driver to communicate with CockroachDB. This article explains how you can migrate an existing PostgreSQL application to CockroachDB if you are interested in scaling your application beyond PostgreSQL capabilities.
If you’re using SQL Server 2016 or a newer version, you should definitely read this article from Brent Ozar about the SQL queries executed by the Telemetry Service.
The 2.9 version of the Hibernate Types project added many features, like support for returning a
java.util.Map from a JPQ query or the
ListResultTransformer that simplifies using the Hibernate
ResultTransformer. However, the most awaited feature is definitely the support for mapping PostgreSQL ARRAY columns to
java.util.List. So, if you’re using Hibernate ORM, then you should definitely use the Hibernate Types open-source project as well.
The SQL:2011 Standard added support for System Versioning, but only SQL Server implemented this awesome feature. However, if you’re using PostgreSQL, this extension adds support for both system-versioned tables and application time period tables.
The Hibernate ORM 5.4.11 version has been released. If you’re using Hibernate 5.4, then you might want to do an upgrade as this release fixes 21 bugs and adds 12 improvements.
PostgreSQL has released the 12.2, 11.7, 10.12, 9.6.17, 9.5.21, and 9.4.26 versions. So, if you’re using PostgreSQL, you should definitely check the release notes of the associated PostgreSQL version you are using.
If you like this newsletter,
you are going to love the next episodes!
The following StackOverflow answers have been trending over the past two weeks:
- How to use the pooled-lo optimizer with Hibernate
- What is
- What is lazy loading in Hibernate?
- What is the purpose of
EntityTransactionwhen using JPA?
- Can a JPA entity have multiple
- The Hibernate hilo strategy does not generate the values according to the next database sequence value