The previous part of this tutorial taught us how we can add custom methods into a single repository. Although that is a very useful skill, it doesn't help us when we have to add the same method into all repositories of our application. Luckily for us, Spring Data provides a way to add custom methods […] Read more
spring data jpa
I think that the best part of writing a blog is to get comments from my readers. Because I have learned a lot from my readers, I want to “reward” the best comments, help you to learn new things, and (hopefully) encourage people to leave more comments. The rules are simple: I select X best […] Read more
When we hear the word auditing, the first thing that comes to mind is an audit log that contains each version of the audited entity. Implementing an audit log is a complex task that takes a lot of time. Luckily, most of the time we don’t need to do it. However, it is quite common […] Read more
When we hear the word auditing, the first thing that comes to mind is an audit log that contains each version of the audited entity. Implementing an audit log is a complex task that takes a lot of time. Luckily, most of the time we don’t need to do it. However, it is quite common […] Read more
The previous part of this tutorial described how we can create database queries with the @Query annotation. This tutorial has now covered two of the three methods which we can use to create query methods with Spring Data JPA. This blog post describes the last method. We will learn to create database queries by using […] Read more
The previous part of this tutorial described how we can create database queries from the method names of our query methods. Although that strategy has its advantages, it has its weaknesses as well. This blog post describes how we can avoid those weaknesses by using the @Query annotation. We will also implement a simple search […] Read more