loopbackjs - Loopback Filter Based On Related Model Properties -


i want able filter based on properties of related models. example, have class object building object. want list of classes take place in building.

this filter

{      "include":"building",    "scope":{         "where":{            "name":"warehouse"       }    } } 

returns all classes, includes building if name "warehouse". want clause on building name apply whole filter class if it's building has name.

is there way want?

thanks!

you can in code, see include filters in docs.

i'm not sure json think should more this:

  include: {     relation: 'building',     scope: {       where: {name: 'warehouse'}     }   } 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -