Reputation: 1
I want to do include with filters based on REST REQUEST
. Something like :
Albums?filter=[include][favorites]&filter[where][favorites.type]=abc
I am using MYSQL
connector.Any help would be greatly appreciated.
Thanks
Upvotes: 0
Views: 92
Reputation: 1536
It's not possible to filter the model based on included items directly. But you can have a few options here:
Set up a remote hook to remove entries that don't match the included items. See http://docs.strongloop.com/display/LB/Remote+hooks.
Create custom method that call Album.find with include and remove entries that don't match the included items. See http://docs.strongloop.com/display/LB/Remote+methods.
Upvotes: 1