Skip to content
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

CustomFilter documentation example does not work correctly. #1415

Open
phtmgt opened this issue Aug 26, 2021 · 0 comments
Open

CustomFilter documentation example does not work correctly. #1415

phtmgt opened this issue Aug 26, 2021 · 0 comments

Comments

@phtmgt
Copy link

phtmgt commented Aug 26, 2021

2 issues:

  1. the $property passed to the filterProperty function is 'regexp_$property' instead of the correct property only. This always bypasses the filter, because, apparently such a property (regex_...) is neither enabled, nor mapped. In addition, even if we skip the bypass, we have issues when using $property in queryBuilder andWhere expressions.
  2. REGEXP expression is not functioning by default in symfony (apparently requires some extra bundle). Maybe use another example that works out of the box.

Finally, one side question:

!$this->isPropertyEnabled($property, $resourceClass) ||
!$this->isPropertyMapped($property, $resourceClass)

Can anyone explain concisely how this logic operates? For some reason, I cannot enable a filter on toMany relationship, as this is always triggered.

@Simperfit Simperfit assigned Simperfit and unassigned Simperfit Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants