You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
filterByJacksonVisibility breaks filtering on relations #2578
The following commit breaks filtering on relationship. 3dc76b8
I have an entity Dossier with a @manytomany on customers:
The DossierRepository extends the QuerydslBinderCustomizer to bind on the customer property.
@RepositoryRestResource(excerptProjection = DossierExcerpt.class)
publicinterfaceDossierRepositoryextendsJpaRepository<Dossier, Integer>, QuerydslPredicateExecutor<Dossier>, QuerydslBinderCustomizer<QDossier> {
@RestResourcePage<Dossier> findAll(@QuerydslPredicatePredicatepredicate, Pageablepageable);
@Overridedefaultvoidcustomize(QuerydslBindingsbindings, QDossierdossier) {
// Like statements on firstName and lastNamebindings.bind(dossier.customers.any().firstName).first(StringExpression::containsIgnoreCase);
bindings.bind(dossier.customers.any().lastName).first(StringExpression::containsIgnoreCase);
}
Formerly I could use: /api/dossiers?customers.firstName=John
However due to the strict checking in filterByJacksonVisibility this bind doesn't work anymore
Thanks @aronbeurskens. The initial description is just about right as it stands. We would rather keep AI generated content out of the ticket, since it tends to add overhead on our side and distracts from the actual problem.
To your initial report: The intent of filterByJacksonVisibility is to avoid exposing any surface that could be used to probe for property names. It is a hardening measure: applications should not be susceptible to someone trying various property names outside the exported model to observe how the application reacts when a model field happens to be hit.
Let us explore how we can pass-thru intended usage of filtered properties when there is Querydsl involved defining bindings. Given we have the registered property path bindings, we should be able to leverage these.
We also ran into this updating an app to Spring Boot 4.0.7. We'd be interested if there is a way to work around this change, for the time being we're holding back on updating Spring Data in that app.
I checked PR #2581 and noticed it already addresses this regression with nested-path handling and regression tests. Thanks for working on this! Is there any additional testing or edge case that would be helpful to investigate?
Activity
mp911de commentedon Jul 1, 2026
Jammer dat ik geen Nederlands versta 🙃.
Thanks @aronbeurskens. The initial description is just about right as it stands. We would rather keep AI generated content out of the ticket, since it tends to add overhead on our side and distracts from the actual problem.
To your initial report: The intent of
filterByJacksonVisibilityis to avoid exposing any surface that could be used to probe for property names. It is a hardening measure: applications should not be susceptible to someone trying various property names outside the exported model to observe how the application reacts when a model field happens to be hit.Let us explore how we can pass-thru intended usage of filtered properties when there is Querydsl involved defining bindings. Given we have the registered property path bindings, we should be able to leverage these.
Banesword commentedon Jul 14, 2026
We also ran into this updating an app to Spring Boot 4.0.7. We'd be interested if there is a way to work around this change, for the time being we're holding back on updating Spring Data in that app.
yashdotdev13 commentedon Nov 12, 2026
I checked PR #2581 and noticed it already addresses this regression with nested-path handling and regression tests. Thanks for working on this! Is there any additional testing or edge case that would be helpful to investigate?