Skip to content

Commit

Permalink
Polishing.
Browse files Browse the repository at this point in the history
Use Javadoc macro. Reformat code.

See #3544
  • Loading branch information
mp911de committed Aug 12, 2024
1 parent bf36d1c commit 3ab36fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@

include::{commons}@data-commons::page$repositories/projections.adoc[leveloffset=+1]

NOTE: It is important to note that <<projections.dtos,Class-based projections>> with JPQL is limited to *constructor expressions* in your JPQL expression, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`. (Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries. And it's important to point out that class-based projections do not work with native queries AT ALL. 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/query/TupleTransformer.html[`TupleTransformer`] and https://docs.jboss.org/hibernate/orm/6.0/javadocs/org/hibernate/query/ResultListTransformer.html[`ResultListTransformer`]
NOTE: It is important to note that <<projections.dtos,Class-based projections>> with JPQL is limited to *constructor expressions* in your JPQL expression, e.g. `SELECT new com.example.NamesOnly(u.firstname, u.lastname) from User u`.
(Note the usage of a FQDN for the DTO type!) This JPQL expression can be used in `@Query` annotations as well where you define any named queries.
And it's important to point out that class-based projections do not work with native queries AT ALL.
As a workaround you may use named queries with `ResultSetMapping` or the Hibernate-specific javadoc:{hibernatejavadocurl}org.hibernate.query.ResultListTransformer[]
1 change: 1 addition & 0 deletions src/main/antora/resources/antora-resources/antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ asciidoc:
spring-framework-docs: '{springdocsurl}'
spring-framework-javadoc: '{springjavadocurl}'
springhateoasversion: ${spring-hateoas}
hibernatejavadocurl: https://docs.jboss.org/hibernate/orm/6.6/javadocs/
releasetrainversion: ${releasetrain}
store: Jpa

0 comments on commit 3ab36fa

Please sign in to comment.