Skip to content

doesNotMatchKeyInQuery 疑惑 #544

Description

@aiqingyuyan

我建立了一个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我不能正常使用, 排除不了想要排出的数据.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions