-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Hi,
I tried using the code snippet below to insert data into a table in rethinkDB if those records do not exist. This runs ok, but multiple Data rows with just Id and nothing else are created alongside the data i am trying to save. a single forloop or forEach run of just 14 records produces inserts of 140 records. Please look at my code and tell me what is wrong. i am on the verge of removing the rethinkDB storage lib
const markups = client.record.getList('Markups');
console.log(`Number of records is ${markups.getEntries().length}`);
console.log(markups.getEntries());
if (markups.isEmpty()) {
// create the record for each markup
for (var i = 0;i < markupSeeds.length;i++) {
const id = 'Markups/' + client.getUid();
const toSave = new MarkupsModel(markupSeeds[i]);
client.record.getRecord(id).set(toSave);
}
markups.discard();
}
markups always returns as an empty list despite the multitude of records in the Markups Table in the DB
Thanks
Metadata
Metadata
Assignees
Labels
No labels