The examples in the documentation not work
// add this line to register inclusion resolver
this.registerInclusion('account', this.account.inclusionResolver);
when i add this line the registerInclusion is not reconozed
and supplierRepository.find({include: [{relation: 'account'}]});
this line show me an error :
/suppliers/2/accounts: 500 Error: Relation "account" is not defined for Supplier model
[
{
id: 1,
name: 'Thor',
account: {accountManager: 'Odin', supplierId: 1},
},
{
id: 5,
name: 'Loki',
account: {accountManager: 'Frigga', supplierId: 5},
},
];
_See Reporting Issues for more tips on writing good issues_
@agnes512 @nabdelgadir, it's related to the inclusion resolver. Could you please take a look? Thanks.
Hi @hevillalobosccxc. We made a mistake in the docs. the function name registerInclusion should be registerInclusionResolver. This has been fixed in this PR. The site will be updated in the near furture.
I solvented, the problem is that all packages in the package.json to loopback were too olds @agnes512 but in the documentation would be specific the version that this method registerInclusion work
My old version:
```@loopback/cli version: 1.16.1
@loopback/* dependencies:
I executed npm update and problem resolved
Most helpful comment
My old version:
```@loopback/cli version: 1.16.1
@loopback/* dependencies:
I executed
npm updateand problem resolved