From 6255da2ae0ae294d2c1bdcee4cfa0cc5a9c7108e Mon Sep 17 00:00:00 2001 From: Raymond Feng Date: Wed, 29 May 2013 07:17:07 -0700 Subject: [PATCH] Fix mixin --- lib/datasource.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/datasource.js b/lib/datasource.js index 7d56c40b..db9564be 100644 --- a/lib/datasource.js +++ b/lib/datasource.js @@ -227,15 +227,10 @@ DataSource.prototype.define = function defineClass(className, properties, settin */ DataSource.prototype.mixin = function (ModelCtor) { - var DataAccessObject = this.DataAccessObject; // inherit DataAccessObject methods - for (var m in DataAccessObject) { - ModelCtor[m] = DataAccessObject[m]; - } - for (var n in DataAccessObject.prototype) { - ModelCtor.prototype[n] = DataAccessObject.prototype[n]; - } + jutil.mixin(ModelCtor, this.DataAccessObject); + } /**