Skip to content

Commit 894a6c2

Browse files
Named native queries and Spring projections
1 parent 9a37b0c commit 894a6c2

File tree

1 file changed

+2
-2
lines changed
  • HibernateSpringBootDtoSpringProjectionPropertiesNamedNativeQuery

1 file changed

+2
-2
lines changed

HibernateSpringBootDtoSpringProjectionPropertiesNamedNativeQuery/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
**[How To Use JPA Named Native Queries Via Properties File And Spring Projection (DTO)](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDtoSpringProjectionPropertiesNamedNativeQuery)**
22

3-
**Description:** This application is an example of combining JPA named native queries listed in a properties file 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.
3+
**Description:** This application is an example of combining JPA named native queries listed in a properties file 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.
44

55
**Key points:**
6-
- define the named queries in a properties file (e.g., `jpa-named-queries.properties`) in a folder named `META-INF` the application classpath
6+
- define the named native queries in a properties file (e.g., `jpa-named-queries.properties`) in a folder named `META-INF` the application classpath
77
- define the proper Spring projection
88

99
-----------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)