nestjsx / crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
4.01k stars 526 forks source link

include soft deleted rows #837

Closed its-dibo closed 3 months ago

its-dibo commented 3 months ago

I want to include the soft deleted rows for all getOneBase operations, but not getManyBase

CrudConfigService.load({
getOneBase: {
  query:{
      withDeleted: true,
  }
}
})

also, ...

@Override()
getOne(@parsedReq() req: any){
   let options = {  withDeleted: true, }
  return this.base.getOneBase(req, options)
}

creating a new custom method doesn't give the same signature as the inherited getOneBase

@GET()
findOne(@Req() req: any){
 // won't work as expected, and all queries must be implemented manually, such as filter, ...
 // there is no exposed functionality to convert req into parsed req, even `(@ParsedReq() req)` gives undefined
 return this.base.getOneBase(req)
}
its-dibo commented 3 months ago

moved to https://github.com/gid-oss/dataui-nestjs-crud/issues/47