Skip to content

doesNotMatchKeyInQuery doesn't work when using same query and key with different query key #621

Closed
@tgreco

Description

@tgreco

My schema:

Match: 
scheduledBy (Pointer to user) 
scheduledWith (Pointer to user)

Photo: 
owner (Pointer to user)

I want to find photos for users that do not have any matches.

What I tried:

 let photoQuery = new Parse.Query(MODEL.Photo.className());
photoQuery.include('owner');

// Do not include people who have matches
let matchQuery = new Parse.Query(MODEL.Match.className());
photoQuery.doesNotMatchKeyInQuery('owner', 'scheduledBy', 	matchQuery);
photoQuery.doesNotMatchKeyInQuery('owner', 'scheduledWith', matchQuery);

// Get final results
return photoQuery.find()

This only works for the scheduledBy column.

Seems like you can't do doesNotMatchKeyInQuery with the same key and query but different query keys for some odd reason.

Can anyone confirm this? If so what would be the best alternative?

I removed scheduledBy and used scheduledWith only and that worked as well. So it's not something wrong with the data it's a bug with Parse I believe.

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