loopbackio / loopbackio/loopback-connector-sqlite3
Filtering with non existing / declared field is ignored
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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