Skip to content

Commit fcc1d8b

Browse files
schaudermp911de
authored andcommitted
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
1 parent dfdb528 commit fcc1d8b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/main/asciidoc/jpa.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,9 @@ public interface GroupRepository extends CrudRepository<GroupInfo, String> {
680680
====
681681

682682

683+
:repository-projections-dto-limitations-file: ../../../../spring-data-jpa/src/main/asciidoc/repository-projections-dto-limitations.adoc
684+
685+
683686
include::{spring-data-commons-docs}/repository-projections.adoc[leveloffset=+2]
684687

685688
[[jpa.stored-procedures]]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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`]

0 commit comments

Comments
 (0)