Quantcast
Channel: Vlad Mihalcea
Viewing all articles
Browse latest Browse all 177

The best way to write a custom Spring Data Repository

$
0
0

Introduction In this article, I’m going to show you the best way to write a custom Spring Data Repository. While the default JpaRepository methods, as well as the query methods, are very convenient in many situations, there might be times when you need custom Repository methods that can take advantage of any JPA provider-specific functionality. When to use a custom Spring Data Repository Let’s assume we want to fetch a one-to-many DTO projection, as I explained in this article. Our JPA query looks like this: Notice that we are unwrapping the JPA... Read More

The post The best way to write a custom Spring Data Repository appeared first on Vlad Mihalcea.


Viewing all articles
Browse latest Browse all 177

Trending Articles