From bef8f9ff00e292fbaeb5d5e67ab36bbc411ad05d Mon Sep 17 00:00:00 2001 From: Rufus Pollock Date: Fri, 29 Jun 2012 00:06:54 +0100 Subject: [PATCH] [#94,backend/memory,transform][s]: support for doing transforms without depending on an id field. * Use index into array instead * Not totally happy with this but still ... --- src/backend.memory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend.memory.js b/src/backend.memory.js index c228b145..c1cf8dcf 100644 --- a/src/backend.memory.js +++ b/src/backend.memory.js @@ -166,7 +166,7 @@ this.recline.Backend.Memory = this.recline.Backend.Memory || {}; var toUpdate = costco.mapDocs(this.data, editFunc); // TODO: very inefficient -- could probably just walk the documents and updates in tandem and update _.each(toUpdate.updates, function(record, idx) { - self.update(record); + self.data[idx] = record; }); return this.save(toUpdate); };