Add include mixin

This commit is contained in:
Ritchie Martori 2014-12-19 14:30:56 -08:00
parent aa979b6340
commit f02d71be1f
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);
};