typeorm / typeorm

ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
http://typeorm.io
MIT License
34.05k stars 6.27k forks source link

Add arrayFilters to update operations #3775

Open YMonnier opened 5 years ago

YMonnier commented 5 years ago

Issue type:

[ ] question [ ] bug report [x] feature request [ ] documentation issue

Database system/driver:

[ ] cordova [x] mongodb [ ] mssql [ ] mysql / mariadb [ ] oracle [ ] postgres [ ] sqlite [ ] sqljs [ ] react-native [ ] expo

TypeORM version:

[x] latest [ ] @next [ ] 0.x.x (or put your version here)

It seems that TypeORM has not yet implemented the arrayFilters. Moreover, Mongodb typescript has implemented that feature.

MongoDB Documentation: https://docs.mongodb.com/manual/release-notes/3.6/#multi-element-array-updates

rustamwin commented 5 years ago

3472

Jasenpan1987 commented 5 years ago

You can simply give the { arrayFilter: { ... } } as any or update the type of the options, the only issue with this option is the type.