Skip to content

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

Merged
dresende merged 1 commit into
dresende:masterfrom
rafaelkaufmann:master
Nov 1, 2013
Merged

dresende merged 1 commit into
dresende:masterfrom
rafaelkaufmann:master

Conversation

@rafaelkaufmann

Copy link
Copy Markdown
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