3
我正在使用旧的解析SDK版本1.5.0和我的函数返回所有包括。 现在我试图使用最新的SDK,并且函数仅返回主对象(在门和位置我只能得到“指针”)。解析云代码新的SDK包括子类不工作
下面是代码:
Parse.Cloud.define("get_gates_for_user", function(request, response) {
var userId = request.params.userId;
var gateToUserQuery = new Parse.Query("GateUserJoinTable");
gateToUserQuery.equalTo("user", {
__type: "Pointer",
className: "_User",
objectId: userId
});
gateToUserQuery.include("gate");
gateToUserQuery.include("location");
gateToUserQuery.find({
success: function(results) {
response.success(results);
},
error: function(error) {
console.log(error.message);
response.error(ERROR_CODE_GENERAL_ERROR);
}
});
});
也许有关? http://stackoverflow.com/questions/33059768/parse-com-javascript-sdk-using-include-but-not-working – melpomene
是的似乎是相同的问题!此外,我尝试使用JavaScript(在浏览器页面上)的代码,我可以得到所有的子类信息。 –
是的,和我的帖子一样。我不明白为什么。有办法做到这一点,但它出现的字典,不像'List' –