Skip to content

how to mix $or and $and ? #36

@timaschew

Description

@timaschew

I want to make a query, something like that: (foo && bar) || (qux && baz)
I wrote it in this style (coffee script)

@getDatabase().findAllLive
  $or:
    $and:
      foo: {$exists: true}
      bar: {$exists: true}
    $and:
      qux: {$exists: true}
      baz: {$exists: true}

But the result is always the part with qux && baz

Here is the real query:
https://gist.github.com/timaschew/0f53f48a8e82431dccf6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions