Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问一下addWhereMatchesQuery 和 innerQuery #25

Open
kingofswing opened this issue May 18, 2018 · 0 comments
Open

问一下addWhereMatchesQuery 和 innerQuery #25

kingofswing opened this issue May 18, 2018 · 0 comments

Comments

@kingofswing
Copy link

文档曰:
当查询的表为系统表(目前系统表有User、Installation、Role)时,需要带上下划线_。
比如,你想查询出用户smile和smile好友的所有帖子,则可以这样:
BmobQuery<User> innerQuery = new BmobQuery<User>();
String[] friendIds={"ssss","aaaa"};//好友的objectId数组
innerQuery.addWhereContainedIn("objectId", Arrays.asList(friendIds));
//查询帖子
BmobQuery<Post> query = new BmobQuery<Post>();
query.addWhereMatchesQuery("author", "_User", innerQuery);
query.findObjects(new FindListener<Post>() {
@Override
public void done(List<Post> object,BmobException e) {
if(e==null){
Log.i("bmob","成功");
}else{
Log.i("bmob","失败:"+e.getMessage());
}
}
});
从字面上来看,那个innerQuery,好像只有好友的ojectId数组,体现查询出smile本人的帖子,是哪个语句实现的? 【比目官方人员:2018-05-18 14:24:21 #1 回复:查询出 smile的帖子外加 smile好友的帖子】
但是我看不出来哪里查了smile本人的帖子。请教

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant