How to do a Database dump of H2 DB

Using the H2 Database is a common option when developing application prototypes. Once challenge is that, if you are using it as in-memory embedded H2 database , you cannot access the database from outside the JVM. A simple trick is to create a dump of the database, to check the data in all tables In this tutorial we will learn several ways to do that in a standard JPA application and in a Spring Boot application.

Read more

Categories jpa

Understanding JPA Entity life cycle

This article discusses the life cycle of Entity objects in JPA Applications. Understanding the different stages that an Entity goes through is crucial for proper understanding of the JPA framework.

Read more

Categories jpa

How to find slow SQL queries with Hibernate or JPA

Data persistence is one of the key factors when it comes to application performance. Therefore, it’s essential to keep track of the performance of your Database statements. First of all, it’s important to stress out that you can log statements emitted by Hibernate through one of the following methods: 1. Adding hibernate.show_sql property to your … Read more

Categories jpa