loopbackio / loopbackio/loopback-connector-sqlite3

Filtering with non existing / declared field is ignored

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13
Forks
21
PR merge metrics
No merged PRs in 30d

Description

### Bug or feature request

- [x] Bug
- [ ] Feature request

### Description of feature (or steps to reproduce if bug)
1. Insert 10 rows in a model/table
1. Model.find({where: { nonexistingfield: 'test' } })
1. Return 10

### Expected result
Return 0 (Memory connector return 0)
Maybe this should return an error ?

### Actual result (if bug)
Return all the documents/rows

### Additional information (Node.js version, LoopBack version, etc)
Tested with `master` of `loopback-connector-sqlite3`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the SQLite3 connector using Model.find({where: { nonexistingfield: 'test' } }) after inserting 10 rows. Compare the result with the stated Memory connector behavior and determine whether an unknown field should return zero rows or an error. Done means the SQLite3 connector no longer returns all rows for this filter, with coverage for the reported query.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sqlite
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.