So, I’ve been trying to bulk add some fields to the table using the suggested code in the API:
base('GameRefereeSlots').create(e
{
"fields": {
"GameCreation": "49",
"Fee": 10,
"Expenses": 10,
"Type": "Referee"
}
},
{
"fields": {
"GameCreation": "49",
"Fee": 10,
"Expenses": 10,
"Type": "Referee"
}
}
], function(err, records) {
if (err) {
console.error(err);
return;
}
records.forEach(function (record) {
console.log(record.getId());
});
});
This, however, does not work as it returns the following error:
message: “Invalid request: parameter validation failed. Check your request data.”
statusCode: 422
I’ve tried different alternatives by removing the “field” key and just having the plain object but it does not work. When adding only one of the options without it being in an array, i.e not batch adding, it works perfectly. Any thoughts on what could be the problem?