[#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 ...
This commit is contained in:
Rufus Pollock 2012-06-29 00:06:54 +01:00
parent 2b3f6e1c5a
commit bef8f9ff00

View File

@ -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);
};