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
Post a Comment