REST在Parse $ in到指针错误代码106的ObjectID中 [英] REST in Parse $in to ObjectID of Pointer Error Code 106
本文介绍了REST在Parse $ in到指针错误代码106的ObjectID中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试获取以下查询:
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"]}}}
我正在视频表上查询课程字段(这是一个指针)获取所有视频,其中的课程是数组中传递的ID之一(因此我使用$ in)因为如果我不使用$ in,我没有问题,但我不需要它。
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.
错误是这样的:
{
code: 106,
error: "key objectId should be a string"
}
什么我要做?你有什么主意吗??
What I have to do? Do you have any idea??
谢谢
推荐答案
你可以试试$ inQuery
where={"course":{"$inQuery":{"where":{"objectId":{"$in":["id1","id2"]}},"className":"Course"}}}
这篇关于REST在Parse $ in到指针错误代码106的ObjectID中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文