Reputation: 35
I write in Node this filter:
include: {
relation: 'province',
scope: {
where: {
'regionId': 9
}
}}
The filter working properly, the rest api filter that I wrote is like this:
filter[include][province][scope][where][regionId]=9
I have this error:
"error": { "name": "Error", "status": 500, "message": "Relation \"scope\" is not defined for Provinces model"
Upvotes: 1
Views: 95
Reputation: 9396
You can use json filter like calling in node, and this is not REST like
?filter={"include": {"relation": "province","scope": {"where": {"regionId": 9}}}}
Upvotes: 0