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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -