我试图找出如何做到这一点。在documentation上,它有一个关于如何使用一种关系获取查询的示例:
// suppose we have a book object
var book = ...
// create a relation based on the authors key
var relation = book.GetRelation<ParseObject>("authors");
// generate a query based on that relation
var query = relation.Query;
// now execute the query
query.FindAsync ();
reviewObject = new ParseObject("Review");
var relationBusiness = reviewObject.GetRelation<ParseObject>("business");
relationBusiness.Add(application.currentBusiness);
var relationUser = reviewObject.GetRelation<ParseObject>("user");
relationUser.Add(ParseUser.CurrentUser);
var relationStaff = reviewObject.GetRelation<ParseObject> ("staff");
relationStaff.Add (application.currentStaff);
请帮忙。谢谢
答案 0 :(得分:0)
毕竟不是那么难:
var query = ParseObject.GetQuery ("Review")
.WhereEqualTo ("business", relationBusiness)
.WhereEqualTo ("user", relationUser)
.WhereEqualTo ("staff", relationStaff);
IEnumerable<ParseObject> reviews = await query.FindAsync();
(relationBusiness,relationUser和relationStaff是ParseObject而不是关系)