
@DynamicUpdate with Spring Data JPA
1. Overview When we use Spring Data JPA with Hibernate, we can use the additional features of Hibernate as well. @DynamicUpdate is one such feature. @DynamicUpdate is a […]
1. Overview When we use Spring Data JPA with Hibernate, we can use the additional features of Hibernate as well. @DynamicUpdate is one such feature. @DynamicUpdate is a […]
1. Introduction In this quick tutorial, we’ll explore two different ways to disable database auto-configuration in Spring Boot, which can come in handy, say, when testing. […]
1. Overview In this tutorial, we’ll explore using H2 with Spring Boot. Just like other databases, there’s full intrinsic support for it in the Spring […]
1. Overview In this article, we’ll show the ways of handling null parameters in Spring Data JPA. In some cases, when we search for records by parameters we want […]
1. Overview In this tutorial, we’ll have a look at how deleting is done in Spring Data JPA. 2. Sample Entity As we know from the Spring […]
1. Introduction For simple queries, it’s easy to derive what the query should be just by looking at the corresponding method name in our code. In […]
1. Overview CrudRepository is a Spring Data interface for generic CRUD operations on a repository of a specific type. It provides several methods out of the box for […]
1. Introduction In this short tutorial, we’ll learn how to create update queries with the Spring Data JPA @Query annotation. We’ll achieve this by using the @Modifying annotation. First, we’ll […]
1. Overview Spring Data provides many ways to define a query that we can execute. One of these is the @Query annotation. In this tutorial, we’ll demonstrate how […]
1. Overview This tutorial will focus on introducing Spring Data JPA into a Spring project, and fully configuring the persistence layer. For a step by step introduction […]
1. Overview This tutorial shows how to set up Spring with JPA, using Hibernate as a persistence provider. For a step-by-step introduction to setting up the […]
1. Overview Spring Boot makes it really easy to manage our database changes in an easy way. If we leave the default configuration, it’ll search […]
1. Overview Spring JDBC and JPA provide abstractions over native JDBC APIs, allowing developers to do away with native SQL queries. However, we often need to see those auto-generated […]
1. Overview This article will focus on simplifying the DAO layer by using a single, generified Data Access Object for all entities in the system, which will […]
1. Overview This article will show how to implement the DAO with Spring and JPA. For the core JPA configuration, see the article about JPA with Spring. 2. […]
1. Overview This article will show how to implement the DAO with Spring and Hibernate. For the core Hibernate configuration, check out the previous Hibernate 5 with […]
1. Overview Persistence providers like Hibernate make use of persistence context to manage the entity lifecycle in an application. In this tutorial, we’ll start with […]
1. Overview Spring’s @Transactional annotation provides a nice declarative API to mark transactional boundaries. Behind the scenes, an aspect takes care of creating and maintaining transactions as […]
1. Introduction In this tutorial, we’ll cover the @Transactional annotation, as well as its isolation and propagation settings. 2. What Is @Transactional? We can use @Transactional to wrap a method in a database transaction. […]
1. Overview This tutorial will discuss the right way to configure Spring Transactions, how to use the @Transactional annotation, and common pitfalls. For a more in-depth discussion on […]