目前我正在开发一个使用iOS loopback sdk获取值的项目。如果它是一个查询,那么这本书的所有内容都可以使用。
但是当嵌套查询(如下所示)发生时,它会显示错误
Error Domain=AFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299), got 500" UserInfo={NSLocalizedRecoverySuggestion={"error":{"name":"Error","status":500,"message":"Relation \"relation\" is not defined for UserGroup model","stack":"Error: Relation \"relation\" is not defined for UserGroup model
查询如下
NSDictionary *filterParams = @{
@"where" : @{
@"group_id" : self.groupDetails[@"groupId"]},
@"include" : @[@"invitedusers",
@{
@"relation" : @"userstatus",
@"scope": @{
@"include":@[ @"useruploads" ]
}
}]
};
答案 0 :(得分:1)
NSDictionary *filterParams = @{
@"where" : @{
@"group_id" : self.groupDetails[@"groupId"]
},
@"include" : @[ @"invitedusers",
@{
@"userstatus" : @"useruploads"
}
]
};