Spring Data JPA: How to Use Named Queries

preview_player
Показать описание
Spring Data JPA provides various options to define and execute queries. All of them use JPA’s query capabilities but make them a lot easier to use.
You can:
-Reference a named native or JPQL query,
-Derive queries from the name of a repository method and
-Declare a query using the @Query annotation.
I already explained the 2nd and 3rd options in previous videos. In this video, I will show you how you can use named queries with Spring Data JPA.

Links mentioned:

➜Ultimate Guide to JPQL Queries with JPA and Hibernate:

Like my channel? Subscribe!

Join the free Member Library:

Want to connect with me?

#SpringData #JPA #NamedQueries
Рекомендации по теме
Комментарии
Автор

We already have
@Query annotation on repository to write custom queries
then what is the case when
one should use Named Queries?

Akash
Автор

Excellent video!
Can you make a video on explaining @Generated annotation in hibernate?

vishwasatrey
Автор

Hi, do you have some article where it explains how to map stored procedure result returned from SQL Server to a custom normal class in Java

webdeveloperify
Автор

Hi, Thanks for all the knowledge sharing. I have a Question regarding @Transactional annotation. Is this annotation set by default (implicitly) when we use @repository. I know that when we want to customize the transaction we can add it in the service layer for ex, but just by using @repository are our personal request (not the crud ones )executed in a transaction . Thx

shomer
Автор

The amount of information you portray is really good, but you’re too fast I play your videos in 0.75 speed to watch and understand

iamthebringer