Hi
I am getting a weird error in CloudCode using a DB.Batch operation.
TypeError: Cannot read property ‘adapter’ of undefined. Below is my code, and it seems to fail on the forEach
line
const job = await DB.job.first();
if (job) {
const batch = new DB.Batch();
const shutdowns = await job.shutdowns.toArray();
shutdowns.forEach(batch.destroy);
batch.destroy(job);
await batch.execute();
}