nestjs-query-mikro-orm 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1469,9 +1469,10 @@ var MikroOrmQueryService = class extends RelationQueryService {
|
|
|
1469
1469
|
* @param opts - Additional options.
|
|
1470
1470
|
*/
|
|
1471
1471
|
async updateOne(id, update, opts) {
|
|
1472
|
-
|
|
1472
|
+
const dateWithClearUndefined = Object.fromEntries(Object.entries(update).filter(([, value]) => value !== void 0));
|
|
1473
|
+
this.ensureIdIsNotPresent(dateWithClearUndefined);
|
|
1473
1474
|
const entity = await this.getById(id, opts);
|
|
1474
|
-
wrap(entity).assign(
|
|
1475
|
+
wrap(entity).assign(dateWithClearUndefined);
|
|
1475
1476
|
await this.repo.getEntityManager().flush();
|
|
1476
1477
|
return entity;
|
|
1477
1478
|
}
|