Mongoose query where value is not null

前端 未结 6 1331
轻奢々
轻奢々 2020-12-23 15:55

Looking to do the following query:

Entrant
    .find
      enterDate : oneMonthAgo
      confirmed : true
    .where(\'pincode.length > 0\')
    .exec (er         


        
6条回答
  •  离开以前
    2020-12-23 16:18

    I ended up here and my issue was that I was querying for

    {$not: {email: /@domain.com/}}
    

    instead of

    {email: {$not: /@domain.com/}}
    

提交回复
热议问题