Hello guys!
Iām struggling a bit when trying to use bulkUpdateManyā¦
Context:
Iāve created a column āTestā which is a number and has a default value 0 on my āUserā table that has already 2k rows. As you know when we add a new column even if it has a default value it comes as āundefinedā for the existent rows.
Iām trying to perform the new function provided by our beloved Moralis team (bulkUpdateMany) however, Iām not making itā¦ could someone help me?
Code example:
const queryUsers = [{ filter: { Test: undefined }, update: { Test: 0 } }];
return await Moralis.bulkUpdateMany("User", queryUsers, {
useMasterKey: true,
});
OBS: if I enable my table to public users be able to write then it works, but obviously I would like only to run it once so then I need the āuseMasterKey: trueā, but it isnāt working.
Error: Permission denied for action update on class _User.
at handleError (moralis.js:25632)