0
我試圖查詢某個表中的所有對象並將其保存到新表中。這基本上是錦標賽的得分,我必須在新表格中進行備份。解析saveAll總是失敗
但是,每當我打電話saveAll它總是失敗。任何人都有這個想法?
var WeeklyScore = Parse.Object.extend("WT_Forest");
var query = new Parse.Query(WeeklyScore);
query.find
(
function(queryResult)
{
var parseObjects = [];
for(var i = 0; i < queryResult.length; i++)
{
var BackupScore = Parse.Object.extend("WT_Forest - Week " + (differentDay/7));
var backupScore = new BackupScore();
backupScore.set("exp", queryResult[i].exp);
backupScore.set("heroData", queryResult[i].heroData);
backupScore.set("isGuest", queryResult[i].isGuest);
backupScore.set("name", queryResult[i].name);
backupScore.set("playerID", queryResult[i].playerID);
backupScore.set("score", queryResult[i].score);
backupScore.set("teamData", queryResult[i].teamData);
parseObjects.push(backupScore);
}
Parse.Object.saveAll(parseObjects).then
(
function(savedResult)
{
response.success("Success");
},
function(errorMessage)
{
response.error("Failed " + errorMessage);
}
);
},
function(errorMessage)
{
response.error(errorMessage);
}
);
下面是我收到的響應消息:
Script Error: 'Failed [object Object]'