所以我的問題是,我有2個集合(表)到我的Kinvey應用程序(國家和城鎮)。 國家/地區表具有添加的列(「名稱」)。 鎮表有兩列(「名稱」,「國家」)。Kinvey URL REST GET請求與相關表
所以我希望我的$ .ajax請求只返回具有由用戶選擇的特定country.name的城鎮的名稱。
舉例來說,如果我有排進鎮表 - 在我的頁面類型「英格蘭」>
{ name: "Manchester", country: (related to the row in Country table with name "England") }
{ name: "Liverpool", country: (related to the row in Country table with name "England") }
{name: "Berlin", country: (related to the row in Country table with name "Germany")
而且客戶到一些輸入的文本字段中列出「曼徹斯特」和「利物浦」。
我的查詢的URL應該如何顯示?我應該使用?解決=或我應該使用?查詢=?
我用這種JSON身體的我POST請求添加表之間的關係 - >
{
"name": "Liverpool",
"country":
{
"_type" : "KinveyRef",
"_id" : (Englands country row id),
"_collection" : "Country"
}
}
附:我更喜歡使用$ .ajax。