Skip to content
This repository was archived by the owner on Feb 6, 2018. It is now read-only.
This repository was archived by the owner on Feb 6, 2018. It is now read-only.

$in operator doesn't work correctly through rest #88

@sunabozu

Description

@sunabozu

I post it here since exactly the same code works fine with feathers-socketio.

So when I use the $in operator and provide an array of values for a field, the result query consists of an object, not an array. For example, the following query

.find({
  query: {
    subfile: state.subfile._id,
    number: {
      $in: [0, 1, 2]
    }
  }
})

results in the following hook.params.query value:

{
  number: {
    $in: { 0: '0', 1: '1', 2: '2' }
  }
...
}

or see the debug console output:

screen shot 2016-11-22 at 19 16 03

This obviously doesn't pass as a correct query (in my case for Mongoose). As I mentioned, I see no such problem using socketio.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions