Skip to content

Commit

Permalink
Add a note that DTO projections are not supported with native queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
schauder committed Jun 16, 2021
1 parent 9c696ae commit 92dec2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/asciidoc/jpa.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
Original file line number Diff line number Diff line change
@@ -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`]

0 comments on commit 92dec2b

Please sign in to comment.