-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pageable queries with dynamic entity name #3245
base: 4.10.x
Are you sure you want to change the base?
Conversation
|
||
private static Function<Object, Object> createEnvResolverValueMapper(Environment environment) { | ||
return o -> { | ||
PropertyPlaceholderResolver resolver = environment.getPlaceholderResolver(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed to replace default behavior from EnvironmentAnnotationValue
which when finds property to resolve also expands strings when finds comma and this is causing this issue creating more query parts than actual parameters.
@JdbcRepository(dialect = Dialect.H2) | ||
public interface CustomEntityRepository extends CrudRepository<CustomEntity, Long> { | ||
Slice<CustomEntity> findAll(Pageable pageable); | ||
|
||
Page<CustomEntity> findByNameIn(List<String> names, Pageable pageable); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add an example of a custom query with IN that does have an expression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 03324f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might fix this issue as well #2959
Quality Gate passedIssues Measures |
Quality Gate passedIssues Measures |
This is potential fix for issue when entity name has configurable value and uses
Pageable
in find.