Closed Code-Crash closed 3 years ago
Hi @Code-Crash ,
To resolve a relation, the repository of a model must register an inclusionResolver. So to include credentials in your find calls, you would have to add this in the UserRepository
-
this.registerInclusionResolver('credentials', this.credentials.inclusionResolver);;
The loopback4 docs explain this here.
@akshatdubeysf Thanks, let me check and will close the issue.
@akshatdubeysf Thanks a lot, it worked. closing the issue.
Hi @team,
I'm trying to setup this repository, and it's done perfectly.
Now, If I want to include credentials while finding user by id, how can I do that?
I tried as below:
but it did not work, got error:
Note: I understood there is no need to include credentials on client side, but I was testing for hasOne relation include which I want to utilise in different model