所以我的问题是,我有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。