dresende/node-orm2 — pull request #365 by rafaelkaufmann (2013-10-31 18:39:57+00:00)
Title: Fixes erroneous misformatting of top-level $and/$or clauses

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.