Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implicit array matching #67

Closed
fcoury opened this issue Aug 27, 2022 · 0 comments · Fixed by #70
Closed

Implicit array matching #67

fcoury opened this issue Aug 27, 2022 · 0 comments · Fixed by #70
Labels
enhancement New feature or request

Comments

@fcoury
Copy link
Owner

fcoury commented Aug 27, 2022

MongoDB queries always match arrays implicitly.

For instance: if you run the query {"a.b.c": 1}, it should match a document where the field "b" is an array containing the object {"c": 1}.

This query also should match at least the following documents:

{"a": [{"b": {"c": 1}}]}
{"a": [{"b": [{"c": 1}]}]}

fcoury added a commit that referenced this issue Aug 27, 2022
For a query like `{"a.b.c": 1}`, MongoDB matches a document where the 
field `"b"` is an array containing the object `{"c": 1}`.

This case is handled by this commit. We also need to investigate the
broader case where it should also match the following objects:

{"a": [{"b": {"c": 1}}]}
{"a": [{"b": [{"c": 1}]}]}

Those other cases are being tracked on issue #67
#67
fcoury added a commit that referenced this issue Aug 27, 2022
For a query like `{"a.b.c": 1}`, MongoDB matches a document where the 
field `"b"` is an array containing the object `{"c": 1}`.

This case is handled by this commit. We also need to investigate the
broader case where it should also match the following objects:

{"a": [{"b": {"c": 1}}]}
{"a": [{"b": [{"c": 1}]}]}

Those other cases are being tracked on issue #67
#67
@fcoury fcoury added the enhancement New feature or request label Aug 27, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant