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.cjs
CHANGED
|
@@ -1475,9 +1475,10 @@ var MikroOrmQueryService = class extends RelationQueryService {
|
|
|
1475
1475
|
* @param opts - Additional options.
|
|
1476
1476
|
*/
|
|
1477
1477
|
async updateOne(id, update, opts) {
|
|
1478
|
-
|
|
1478
|
+
const dateWithClearUndefined = Object.fromEntries(Object.entries(update).filter(([, value]) => value !== void 0));
|
|
1479
|
+
this.ensureIdIsNotPresent(dateWithClearUndefined);
|
|
1479
1480
|
const entity = await this.getById(id, opts);
|
|
1480
|
-
core.wrap(entity).assign(
|
|
1481
|
+
core.wrap(entity).assign(dateWithClearUndefined);
|
|
1481
1482
|
await this.repo.getEntityManager().flush();
|
|
1482
1483
|
return entity;
|
|
1483
1484
|
}
|