Merge pull request #10 from strongloop/fix/missing-include-mixin

Add include mixin
This commit is contained in:
Miroslav Bajtoš 2015-01-13 19:17:01 +01:00
commit b5873e3532
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@ var assert = require('assert');
var remoting = require('strong-remoting');
var jutil = require('loopback-datasource-juggler/lib/jutil');
var RelationMixin = require('./relations');
var InclusionMixin = require('loopback-datasource-juggler/lib/include');
/**
* Export the RemoteConnector class.
@ -39,6 +40,7 @@ function RemoteConnector(settings) {
// handle mixins in the define() method
var DAO = this.DataAccessObject = function() {
};
}
RemoteConnector.prototype.connect = function() {
@ -62,6 +64,7 @@ RemoteConnector.prototype.define = function(definition) {
' to a remote connector without a Model.sharedClass');
jutil.mixin(Model, RelationMixin);
jutil.mixin(Model, InclusionMixin);
remotes.addClass(Model.sharedClass);
this.resolve(Model);
};