fix(api): move builtin logic + adapt unit tests

This commit is contained in:
yassinedorbozgithub
2025-05-15 13:57:17 +01:00
parent 7a23b0ded7
commit 2f5c85cb64
5 changed files with 8 additions and 23 deletions

View File

@@ -561,7 +561,7 @@ export abstract class BaseRepository<
}
async deleteMany(criteria: TFilterQuery<T>): Promise<DeleteResult> {
return await this.model.deleteMany(criteria);
return await this.model.deleteMany({ ...criteria, builtin: { $ne: true } });
}
async preCreateValidate(