Add include mixin
This commit is contained in:
parent
aa979b6340
commit
f02d71be1f
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue