withDelete option to TypeOrm (#10161)

fixes https://github.com/twentyhq/core-team-issues/issues/112
This commit is contained in:
Guillim
2025-02-13 08:50:24 +01:00
committed by GitHub
parent d2a5027549
commit 372ebd14fe
2 changed files with 5 additions and 0 deletions

View File

@ -662,6 +662,10 @@ export class WorkspaceRepository<
transformedOptions.where = await this.formatData(options.where);
if (options.withDeleted) {
transformedOptions.withDeleted = true;
}
return transformedOptions;
}

View File

@ -77,6 +77,7 @@ export class CreateCompanyAndContactService {
}
const alreadyCreatedContacts = await personRepository.find({
withDeleted: true,
where: {
emails: { primaryEmail: Any(uniqueHandles) },
},