Skip to content

Query filtering does not filter objects in arrays #1712

@reduce

Description

@reduce

Steps to reproduce

app.service('users').find({
  query: {
    $and: [{
      $anything: 'function () { }'
    }]
  },
})

Expected behavior

Keys prefixed with $ that are not in options.filters and options.whitelist should throw an error, even when being used in an object within an array of the query.

Actual behavior

MongoError: unknown top level operator: $anything MongoError: unknown top level operator: $anything

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working): All

NodeJS version: All

Operating System: All

Browser Version: All

React Native Version: All

Module Loader: All

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions