Skip to content

Commit 31994bc

Browse files
Named queries and Spring projections
1 parent d4b00aa commit 31994bc

File tree

1 file changed

+3
-3
lines changed
  • HibernateSpringBootDtoSpringProjectionPropertiesNamedQuery

1 file changed

+3
-3
lines changed

HibernateSpringBootDtoSpringProjectionPropertiesNamedQuery/README.md

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

3-
**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.
3+
**Description:** This application is an example of combining JPA named 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.
44

55
**Key points:**
6-
- define the named queries
6+
- define the named 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)