LearnBoost/mongoose — Issue #723: insertAll
Author: aheckmann
Created: 2012-02-08 15:14:04+00:00
State: open

batch inserts would be good for perf (with in the model.create method).

obstacles in 2.x:

1) dependence on triggering each inserted documents 'save' hooks. the hook system isn't flexible enough for us to trigger them without actually calling doc.save.
2) doc.save() is tightly coupled to its persistence method to the db (e.g. collection.insert, collection.update). we don't actually want to .insert() it.

we want to trigger hooks without calling doc.save(), then use insertAll.