Skip to content

Fix InArray filter for object items #4

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

Merged
merged 1 commit into from
Oct 2, 2019

Conversation

codeliner
Copy link

@codeliner codeliner commented Oct 2, 2019

Fixes event-engine/php-document-store#4

I've added some tests for the InArray filter. It worked correctly when querying for example an array of tags (string[]) but failed to filter documents that contain an array of objects with a filter that queries a subkey of the objects insight the array (see added tests for details).

The problem could be fixed by surrounding the json_encoded InArray filter value with square brackets. Found the solution here

@codeliner codeliner merged commit 1493426 into master Oct 2, 2019
heiglandreas added a commit to heiglandreas/php-document-store that referenced this pull request Oct 3, 2019
This modifies the InArrayFilter to handle Objects similar to the way that the [PostgreSQL-Store handles them](event-engine/php-postgres-document-store#4)
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

Successfully merging this pull request may close these issues.

How to query for content inside an array
1 participant