Skip to content

Files

Latest commit

 

History

History
19 lines (14 loc) · 1.73 KB

File metadata and controls

19 lines (14 loc) · 1.73 KB

How To Use JPA Named Queries @NamedQuery And Spring Projection (DTO)

Description: This application is an example of combining JPA named queries @NamedQuery and Spring projections (DTO). For queries names we use the {EntityName}.{RepositoryMethodName} naming convention. This convention allows us to create in the repository interface methods with the same name as of named query.

Key points:

  • define the named queries
  • define the proper Spring projection

If you need a deep dive into the performance recipes exposed in this repository then I am sure that you will love my book "Spring Boot Persistence Best Practices"If you need a hand of tips and illustrations of 100+ Java persistence performance issues then "Java Persistence Performance Illustrated Guide" is for you.