$only for feature for fields that are embedded arrays

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.5.0
    • Component/s: Querying
    • None
    • Query
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Similar to the new slice functionality

      db.foo.find( {} , { likes: { $only: [user_1, user_2]} } ) and it would return the list of user_ids that were found

      My original idea was to recommend something like this, but mstearn recommended the one above instead.

      db.foo.find( {} , { likes: { $has: user_1 } } ) and it would use return True/False

      Because I just want the objects, and I want to know if the user liked each one without returning the full list of likes.

            Assignee:
            Backlog - Query Team (Inactive)
            Reporter:
            Stanislav Vishnevskiy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: