My problem is how can I get multilevel connection structures in a request with the LoopBack backend I have 3 models Are: continent
, country
, county
. I want to get a continent and get it in all countries and all the counties.
Relationships between the two:
-
Continent
contains manycountry
, and Therefore,
/ api / continent / 1
{"id": 1 "name": "Europe"}
Now, I want to receive all the countries and countries with the Continent
, so do I do a query for / api / continent / 1? Filter [Include] = Country
However, I do not receive counties.
What kind of query should I make to get a list that includes both the relationship level? {ID: 1, Name: "United Kingdom", County: [/ b] {ID: 1, Name: "Avon": Thank you for your help!
syntax is:
/ api / continent / 1? Filter = {"include": {"country": "counties"}}
No comments:
Post a Comment