Query with $in and $lt

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Macintosh
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Hi,

      I am trying to execute the below query, it does not find result.

      db.users.find({ "_id" : "abc", "SYS_PERM" : { "$in" : [{ "_ANY_" : { "$lt" : 3 } }, { "_ALL_" : { "$lt" : 3 } }] } })
      

      It looks $lt operator doesn't work inside of $in operator. The same work if I remove the $lt as follows.

      db.users.find({ "_id" : "abc", "SYS_PERM" : { "$in" : [{ "_ANY_" : 1 }, { "_ALL_" : 1 }] } })
      

      Is this the current known limitation in MongoDB?

            Assignee:
            Mark Agarunov (Inactive)
            Reporter:
            Saravanan Kuppusamy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: