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

Fixes erroneous misformatting of top-level $and/$or clauses #365

Merged
merged 1 commit into from
Nov 1, 2013

Conversation

rafaelkaufmann
Copy link
Contributor

Top-level $and/$or clauses are surprisingly common when you're doing nontrivial queries from your app. Example:

{
    field: cond,
    $and: [condA, condB, condC]
}

Often there's no way to rewrite these subconditions as top-level conditions. They can be arbitrarily complex.

A simple check for $operators in the convertToDB helper function allows this to happen.

dresende added a commit that referenced this pull request Nov 1, 2013
Fixes erroneous misformatting of top-level $and/$or clauses
@dresende dresende merged commit 8247857 into dresende:master Nov 1, 2013
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.

2 participants