How To Use JPA Named Native Queries @NamedNativeQuery
And Spring Projection (DTO)
Description: This application is an example of combining JPA named native queries @NamedNativeQuery
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 native query.
Key points:
- define the named native queries
- define the proper Spring projection