我创建了一个允许用户发帖的应用,其他人可以发表评论。在MainActivity中,当用户点击帖子时,它会将用户带到CommentActivity。
检索帖子的对象ID:
post_id = intent.getStringExtra("post_id");
评论的帖子:
Comments comments = new Comments();
comments.put("parent",ParseObject.createWithoutData("post",post_id));
但是,在查询评论时没有出现任何内容:
ParseQueryAdapter.QueryFactory<Comments>factory= new ParseObjectAdapter.QueryFactory<Comments>(){
ParseQuery<Comments>query =Comments.getquery();
query.whereEqualTo("parent",post_id);
query.include ("user");
query.orderByDescending("createdAt");
return query;
}};
如何使用指针查询链接对象?
答案 0 :(得分:0)