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

doesNotMatchKeyInQuery 疑惑 #544

Open
aiqingyuyan opened this issue May 16, 2018 · 0 comments
Open

doesNotMatchKeyInQuery 疑惑 #544

aiqingyuyan opened this issue May 16, 2018 · 0 comments

Comments

@aiqingyuyan
Copy link

我建立了一个DeletedStatus存储class, 然后想通过doesNotMatchKeyInQuery来过滤掉用户Inbox Status里被标记删除的status, DeletedStatus里有一个status字段(string类型)存储被删除掉的status的objectId和source字段(Pointer类型, 指向_User), 然后我构建了如下query来过滤掉被删除的状态:

const targetUser = AV.Object.createWithoutData("_User", userId);
const query = AV.Status.inboxQuery(targetUser);
const innerQuery = new AV.Query("DeletedStatus");

innerQuery
  .equalTo("source", targetUser)
  .select("status")

query
  .doesNotMatchKeyInQuery("objectId", "status", innerQuery)
  ...
  .find()

DeletedStatus目前有一条测试数据

但query返回的结果还是包含了被删除的那条status, 也就是doesNotMatchKeyInQuery我不能正常使用, 排除不了想要排出的数据.

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