nestjsx/crud

How to list soft deleted data when using crud generator

abhishek-p-au16 opened this issue · 2 comments

Select soft deleted record when using left joint

How to list soft deleted data when using crud generator

Hi, did you find a solution ?

@abhishek-p-au16

 protected setJoin(cond: QueryJoin, joinOptions: JoinOptions, builder: SelectQueryBuilder<PartnershipRequestEntity>): boolean {
    builder.withDeleted().andWhere({ deleted: IsNull() });
    super.setJoin(cond, joinOptions, builder);
    return true;
  }

You can try this, withDeleted remove all deleted is null, and then I add a where deleted is null on ma main entity. I'm not sure if this is the correct function to override but that works