Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to list soft deleted data when using crud generator #804

Open
abhishek-p-au16 opened this issue Sep 6, 2022 · 2 comments
Open

How to list soft deleted data when using crud generator #804

abhishek-p-au16 opened this issue Sep 6, 2022 · 2 comments

Comments

@abhishek-p-au16
Copy link

Select soft deleted record when using left joint

How to list soft deleted data when using crud generator

@ag7-alexis
Copy link

Hi, did you find a solution ?

@ag7-alexis
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants