mongodb - Meteor $and with $or -


i'm trying $and , $or in meteor mongo query have following doesn't seem working

would query match documents organizationid key has value in variable user.organizationid , type key either 'converntional' or 'transition'

{     organizationid: user.organizationid,       $and:[        { $or:[            {type: 'conventional'},            {type: 'transition'}        ]}    ] };  

i can't use $not i'm pretty sure it's not supported in meteor. right package i'm using not support it.

the following query describes after uses $in operator match documents type key either 'converntional' or 'transition'. $and operator implicitly provided when specifying comma separated list of expressions. using explicit , $and operator necessary when same field or operator has specified in multiple expressions.

would query match documents organizationid key has value in variable user.organizationid , type key either 'converntional' or 'transition'

{     organizationid: user.organizationid,      type: {          $in : ['conventional', 'transition']      } } 

Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -