I'm developing a account management system using loopback4
I have defined following relationships on my models properly.
Owner hasMany Transaction
Transaction belongsTo owner
Transaction belongsTo Bank
I want to find all transactions belongs to one owner and include Bank details in response object. This is what I try to do
// OwnerRepository
// owner.repository.ts
const transList = this.transactionRepository.find({ include: [Bank] })
But I couldn't figure out how include filter works. All relations are working fine. I'm using mongodb
for database.
Please explain me how to use the include filter properly.
thanks