I have a Repository class with which I would like to delete Entities in my database using the inherited method repository.delete() based on 2 conditions combined via the OR operator.
I would to achieve something like that:
deleteAllAboOfUser(userId: string): Promise<DeleteResult> {
return this.delete([
{ followerId: userId},
{followingId: userId}
]);
}
And the generated SQL should look like the following:
DELETE FROM subscription WHERE follower_id = 'xxxx' OR following_id = 'xxxx';
But it seems to be impossible currently to uses the OR condition for the delete, but only the AND.