Reputation: 7802
I'm trying to get the following query:
https://api.parse.com/1/classes/Video?where=
{"course":{"__type":"Pointer","className":"Course","objectId":{"$in":["id1","id2"]}}}
I'm querying on Video table, on "course" field (It's a pointer) to get all videos that its course is one of ids passed in the array (For this reason I use $in) because if I don't use $in, I don't have problems but I don't need it.
The error is this:
{
code: 106,
error: "key objectId should be a string"
}
What I have to do? Do you have any idea??
Thanks
Upvotes: 2
Views: 242
Reputation: 24979
You can try with the "$inQuery"
where={"course":{"$inQuery":{"where":{"objectId":{"$in":["id1","id2"]}},"className":"Course"}}}
Upvotes: 1
Reputation: 62676
I've not used the rest API, but the guide indicates that you can compound conditions with $or, as follows...
https://api.parse.com/1/classes/Video?where={"$or":[
{"course":{"__type":"Pointer","className":"Course","objectId":"id1"}},
{"course":{"__type":"Pointer","className":"Course","objectId":"id2"}}
]}
Upvotes: 1