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

Keep $elemMatch behavior consistent with MongoDB #131

Open
apkar opened this issue Mar 26, 2019 · 0 comments
Open

Keep $elemMatch behavior consistent with MongoDB #131

apkar opened this issue Mar 26, 2019 · 0 comments
Milestone

Comments

@apkar
Copy link
Contributor

apkar commented Mar 26, 2019

Document Layer allows $elemMatch to work against nonarray fields, whereas MongoDB allows only on array fields. Array operators semantics are quite confusing already. Although allowing $elemMatch on nonarray fields allows a few extra cases, it's leading to confusing semantics. Also, its possible to represent those extra queries with cleared, arguably longer queries.

This issue is to change the behavior back to supporting the operator only for array fields.

Although this is a backward incompatible change, I think we should go for it as this is a bit consistent for different queries especially when we use it together with None.

@apkar apkar self-assigned this Apr 1, 2019
@apkar apkar added this to the 1.7.0 milestone Apr 1, 2019
@apkar apkar modified the milestones: 1.7.0, 1.7.1 Apr 16, 2019
@apkar apkar modified the milestones: 1.7.1, 1.7.3 May 1, 2019
@apkar apkar removed their assignment Sep 19, 2019
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

1 participant