The power of ORM is in the Related Models Query
https://docs.strongloop.com/display/public/LB/Querying+related+models
But there are some problem at the filter part. I cannot make it work.
But at lest I can make it work on the normal query.
var query = {
"where": {"id": "1234567890abcedf"},
include: ['Photos','Comments','Owner',{owner:'profile'}]
}
Data.find(query,....)
Above query will get the Data who id is 1234567890abcedf and also its Medias, Comments,Owner and Owner's Profile Data
You can use a single query to get all the related model and related relate model.
This is cool. Save me a lot of Async code.
Comments