-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Description
Issue type:
[ ] question
[x] bug report
[ ] feature request
[x] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[x] postgres
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem:
Reproducible with https://github.com/typeorm/typescript-example
- Create some categories in the DB
Add this snippet
const categoryRepository = getRepository(Category);
const categories = await categoryRepository.find({doesNotExist: 'any value'} as any);
console.log(categories);
I would expect categories to be empty since we're querying a non-existent field. However the query actually returns everything (i.e., every record in the Category table).
Is there any reason the doesNotExist key is not present in the resulting SQL query please?
baba43, reverie, AntCas, tbf-siteimprove, intsco and 6 morebay007