Hi, hope this is not too late for an answer. After carefully flipping through their documents inside and outside of this problem, I ended up writing a remote method to achieve this deep multiple level. It is not so clear how to do this at the REST api level.
Continent.listContinents = function(limit,skip,order,cb) { Continent.find({ limit:limit, skip:skip, order:order, include:[{country:'county'}], }, cb); }; Continent.remoteMethod('listContinents', { description:"List continents. Include the related country and county information", returns: {arg: 'continents', type: 'array'}, accepts: [{arg: 'limit', type: 'number', http: { source: 'query' }}, {arg: 'skip', type: 'number', http: { source: 'query' }}, {arg: 'order', type: 'string', http: { source: 'query' }}], http: {path:'/list', verb: 'get'} });
I added some additional query string parameters limit, order and skip to enable pagnination and ordering..but not must :)
It is also assumed that you already have relationship types defined between the continent and the country, and then the country and the county.
source share