Skip to content

Filtering with non existing / declared field is ignored / skipped #125

Open
@HugoPoi

Description

@HugoPoi

Bug or feature request

  • Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

  1. Insert 10 rows in a model/table
  2. Model.find({where: { nonexistingfield: 'test' } })
  3. Return 10 rows

https://github.com/strongloop/loopback-connector/blob/97d2aea8686a2c66070696a73d23be0a76d14b97/lib/sql.js#L1096-L1100

Expected result

Return 0 (Memory connector return 0 and MongoDB Connector too)
In case of SQL this should throw an error ?

Actual result (if bug)

Return all the documents/rows

Additional information (Node.js version, LoopBack version, etc)

Only affect SQL connectors using lib/sql.js

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