From dc318dae727c3c0e1d3273d7eb81051a71ae18ba Mon Sep 17 00:00:00 2001 From: Benjamin Pannell Date: Wed, 11 Dec 2013 11:12:52 +0200 Subject: [PATCH] Allow model constructor arguments to be passed to new model plugin hook --- lib/Model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Model.js b/lib/Model.js index 5916e9e..f52f2c3 100644 --- a/lib/Model.js +++ b/lib/Model.js @@ -78,7 +78,7 @@ function Model(database, collection, schema, options) { }); for(var i = 0; i < database.plugins.length; i++) { - if(database.plugins[i].newModel) database.plugins[i].newModel.call(this); + if(database.plugins[i].newModel) database.plugins[i].newModel.call(this, database, collection, schema, options); } }