loopback 3 access include relation code example
Example 1: loopback relations include inside include
// Return all post owners (users), and all posts and orders of
// each owner. The posts also include images.
Post.find({include: {owner: [{posts: 'images'} , 'orders']}},
function() { /* ... */ });
Example 2: loopback include relation
in url:
/customers?filter[include]=reviews
in code:
User.find({include: 'reviews'}, function() { /* ... */ });