loopback4-microservice-catalog icon indicating copy to clipboard operation
loopback4-microservice-catalog copied to clipboard

Support of JOINs in repository calls

Open akshatdubeysf opened this issue 4 years ago • 1 comments

Is your feature request related to a problem? Please describe. As of now, including a related model in the repository calls results in two DB hits, there should be a way to avoid this using joins.

Describe the solution you'd like There should be an optional parameter that when provided should fetch the related models using JOINS instead of separate DB calls -

repo.find({include: [{relation:'child', join:true}]});

Describe alternatives you've considered Other options that were considered were contributing to the loopback connector repo, but that would be time consuming, so could try an extension for repositories instead.

akshatdubeysf avatar Nov 08 '21 07:11 akshatdubeysf

need to change interface for calling the join based provider

akshatdubeysf avatar Jan 04 '22 11:01 akshatdubeysf