Skip to content

Commit 13f9657

Browse files
committed
Document dynamic projections parameter detection.
Closes #2510
1 parent 05260bf commit 13f9657

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/asciidoc/repository-projections.adoc

+5-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ This way, the method can be used to obtain the aggregates as is or with a projec
304304

305305
.Using a repository with dynamic projections
306306
====
307-
[source, java, subs="+attributes"]
307+
[source,java,subs="+attributes"]
308308
----
309309
void someMethod(PersonRepository people) {
310310
@@ -316,3 +316,7 @@ void someMethod(PersonRepository people) {
316316
}
317317
----
318318
====
319+
320+
NOTE: Query parameters of type `Class` are inspected whether they qualify as dynamic projection parameter.
321+
If the actual return type of the query equals the generic parameter type of the `Class` parameter, then the matching `Class` parameter is not available for usage within the query or SpEL expressions.
322+
If you want to use a `Class` parameter as query argument then make sure to use a different generic parameter, for example `Class<?>`.

0 commit comments

Comments
 (0)