erictgrubaugh
10/29/2019, 10:52 PMtype
and id
property to describe the record. Then I just delete them all like so:
list1.forEach(deleteRecord);
list2.forEach(deleteRecord);
list3.forEach(deleteRecord);
list4.forEach(deleteRecord);
list5.forEach(deleteRecord);
where:
function deleteRecord(obj) { r.delete(obj); }
The list-building works correctly, the deletion works correctly, but in some cases it fails due to record dependencies. There are no dependencies other than those in this specific chain, and I have the ordering correct that dependent records are deleted first and that should never happen.
It's behaving like the forEach
and/or the delete
calls are asynchronous, but I'm not aware of that being the case. Any thoughts?