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
Closes #2009
Related ticket: spring-projects/spring-data-commons#2382
Original pull request: #2237
  • Loading branch information
schauder authored and mp911de committed Jun 17, 2021
1 parent dfdb528 commit fcc1d8b
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 fcc1d8b

Please sign in to comment.