The user field is a KinveyRef object, in this case?
M
Michele Longhi
said
about 7 years ago
Yes it is.
In the case of the first example "organization" it's also a KinveyRef object.
Using "organization._id" and self.model.organization.entityId the query is working.
M
Mike
said
about 7 years ago
Thanks. Using the _id piece is the correct behavior. We had a convenience part before that put it in the "_id" automatically when using a target object, but that must have fallen out since then. We will fix that in a future release.
Michele Longhi
KCSQuery *query = [KCSQuery query];
[query addQuery:[KCSQuery queryOnField:@"status" withExactMatchForValue:@0]];
[query addQuery:[KCSQuery queryOnField:@"organization" withExactMatchForValue:self.model.organization]];
[_store queryWithQuery:query
withCompletionBlock:^(NSArray *objectsOrNil, NSError *errorOrNil)
{