Add a note that DTO projections are not supported with native queries.

Closes #2009
Related ticket: spring-projects/spring-data-commons#2382
Original pull request: #2237
This commit is contained in:
Jens Schauder
2021-06-16 09:19:12 +02:00
committed by Mark Paluch
parent dfdb528458
commit fcc1d8b317
2 changed files with 4 additions and 0 deletions

View File

@@ -680,6 +680,9 @@ public interface GroupRepository extends CrudRepository<GroupInfo, String> {
====
:repository-projections-dto-limitations-file: ../../../../spring-data-jpa/src/main/asciidoc/repository-projections-dto-limitations.adoc
include::{spring-data-commons-docs}/repository-projections.adoc[leveloffset=+2]
[[jpa.stored-procedures]]

View File

@@ -0,0 +1 @@
NOTE: Class based projections do not work with native queries. As a workaround you may use named queries with `ResultSetMapping` or the Hibernate specific https://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/transform/ResultTransformer.html[`ResultTransformer`]