From 9025692e22b879dab976b27bea3d84aeff442e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20M=C3=BCnd?= Date: Thu, 25 Sep 2025 21:05:15 +0200 Subject: [PATCH] fix(orm): return soft delete query results to be consistent with normal query operation results --- packages/orm/src/plugin/soft-delete-plugin.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/orm/src/plugin/soft-delete-plugin.ts b/packages/orm/src/plugin/soft-delete-plugin.ts index 37e8e35f8..5b59bc72d 100644 --- a/packages/orm/src/plugin/soft-delete-plugin.ts +++ b/packages/orm/src/plugin/soft-delete-plugin.ts @@ -98,21 +98,21 @@ export class SoftDeleteQuery extends Query { async restoreOne() { const patch = { [deletedAtName]: undefined } as Partial; if (this.classSchema.hasProperty('deletedBy')) patch['deletedBy'] = undefined; - await this.withSoftDeleted().patchOne(patch); + return this.withSoftDeleted().patchOne(patch); } async restoreMany() { const patch = { [deletedAtName]: undefined } as Partial; if (this.classSchema.hasProperty('deletedBy')) patch['deletedBy'] = undefined; - await this.withSoftDeleted().patchMany(patch); + return this.withSoftDeleted().patchMany(patch); } async hardDeleteOne() { - await this.withSoftDeleted().deleteOne(); + return this.withSoftDeleted().deleteOne(); } async hardDeleteMany() { - await this.withSoftDeleted().deleteMany(); + return this.withSoftDeleted().deleteMany(); } }