Consider enclosing class for dynamic projection parameter detection.

We now consider the enclosing class to determine correct generic typing.

Closes #3020
This commit is contained in:
Mark Paluch
2024-01-11 11:04:46 +01:00
parent 6623bd8d91
commit 0093c9085b
4 changed files with 22 additions and 4 deletions

View File

@@ -146,7 +146,7 @@ public abstract class QuerydslPredicateArgumentResolverSupport {
throw new IllegalArgumentException("Method parameter is not backed by a method");
}
return detectDomainType(TypeInformation.fromReturnTypeOf(method));
return detectDomainType(TypeInformation.fromReturnTypeOf(method, parameter.getContainingClass()));
}
private static TypeInformation<?> detectDomainType(TypeInformation<?> source) {