gid-oss / dataui-nestjs-crud

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

Join Condition (on clause) not working as given in the docs #53

Open faiqahsan opened 4 months ago

faiqahsan commented 4 months ago

As given in the docs when sending the query string like http://localhost:3100/Customers?join=facilities||id,status||on[0]=facilities.status||$eq||Archived&filter[0]=id||$eq||4 the join condition gets omitted because the join key is not intercepted correctly, key value pair is coming as key= join=facilities||id,status||on value= facilities.status||$eq||Archived

But we actually need key= join value= facilities||id,status||on[0]=facilities.status||$eq||Archived

faiqahsan commented 4 months ago

Only fix is to just add brackets to the join clause like this. http://localhost:3100/Customers?join[]=facilities||id,status||on[0]=facilities.status||$eq||Archived&filter[0]=id||$eq||4 but i believe this should be updated in the docs as well. @zaro

afilp commented 4 months ago

Can you please add a PR for the docs to be updated accordingly? Thanks!

Also @@ZaidMaslouhi, FYI.