High-Performance Java Persistence Newsletter, Issue 5
Imagine having a tool that can automatically detect JPA and Hibernate performance issues. 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.
Since version 13, Java now supports multiline string literals via the Text Blocks feature. To see how much more readable are SQL or JPQL queries, JSON, HTML, and XML string literals when using Text Blocks, then you should definitely read this article,
When writing SQL queries with the NOT IN query expression, you need to be very careful when using columns that can contain NULL values. For more details about this topic, check out this article on the MySQL blog. You will also learn how the
IS NOT TRUE clause works when used in an IN or NOT IN query expression.
Franck Pachot wrote a very good article about the MySQL stored procedure examples you can find in the Sakila database. While the examples are designed for simplicity, some of the Sakila stored procedures are better off written as a simple SQL query.
You can run two types of MySQL servers on Amazon cloud, RDS and Aurora. If you are curious about the differences between those two options, as well as what advantages and disadvantages, each option has, then you should read this very comprehensive comparison published by Percona.
JPA is a very popular data access technology in the Java ecosystem, no matter if you are using Spring, Spring Boot, or Java EE. If you want to learn more about the
persistence.xml configuration file, as well as how you can customize the
EntityManagerFactory when bootstrapping JPA programmatically, then this article is going to help you get a better understanding of this topic.
With the widespread adoption of microservices architectures, it’s very important to understand how distributed systems work. Therefore, I recommend you this article, written by Eric Brewer in 2012. When it comes to database and distributed systems, books and articles are very relevant even tens of years after they are published, so don’t overlook a good article just because you might assume it’s outdated based on the publishing data alone.
I released the 2.0.2 version of Hypersistence Optimizer, which adds better scanning support for legacy HBM mappings and improves the offline documentation that’s bundled in the release pack. For more details, check out the release notes.
I managed to release the 2.9.5 version of the Hibernate Types project, which reduces the number of Logger instances used by the framework. In a future release, I plan on removing the hard dependency as Hibernate uses JBoss Logging anyway.
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 implement one-to-one, one-to-many, and many-to-many relationships while designing tables?
- Java multiline string
- Confusion: @NotNull vs. @Column(nullable = false) with JPA and Hibernate
- How do I create a persistence.xml file for Hibernate JPA?
- What is the proper way to re-attach detached objects in Hibernate?
- Hibernate throws org.hibernate.AnnotationException: No identifier specified for entity
- Is the buildSessionFactory() Configuration method deprecated in Hibernate