我正在解析查询以获取数据,但新的查询参数会覆盖旧的。
在我的应用程序中,用户可以阻止其他用户。完成后,我像这样将“块”对象写入数据库
我阻止其他用户:
ParseObject block = new ParseObject("Block");
block.put("owner",ParseUser.getCurrentUser());
block.put("who",otherUser);
当我得到数据时,我使用这个查询。
//I blocked him. dont sow me his data.
ParseQuery<ParseObject> benblock= new ParseQuery<ParseObject>("Block");
benblock.whereEqualTo("owner", ParseUser.getCurrentUser());
//He blocked me dont show me his data.
ParseQuery<ParseObject> oblock = new ParseQuery<ParseObject>("Block");
oblock.whereEqualTo("who",ParseUser.getCurrentUser());
query.whereDoesNotMatchKeyInQuery("user","owner",oblock); //This line doesn't work
query.whereDoesNotMatchKeyInQuery("user","who",benblock); //But this line does.
但是当我检索数据时第一个查询选项
query.whereDoesNotMatchKeyInQuery("user","owner",oblock);
仅最后一个不起作用
query.whereDoesNotMatchKeyInQuery("user","who",benblock);
作品。我怎样才能解决这个问题。