目前我正在开发一个使用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" ]
}
}]
};
最佳答案
NSDictionary *filterParams = @{
@"where" : @{
@"group_id" : self.groupDetails[@"groupId"]
},
@"include" : @[ @"invitedusers",
@{
@"userstatus" : @"useruploads"
}
]
};