Merge pull request #35 from strongloop/fix/missing-dynamic-converter
Register Models with Dynamic converter
This commit is contained in:
commit
994e3afabc
|
@ -40,7 +40,7 @@ function RemoteConnector(settings) {
|
|||
// handle mixins in the define() method
|
||||
var DAO = this.DataAccessObject = function() {
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
RemoteConnector.prototype.connect = function() {
|
||||
|
@ -77,6 +77,11 @@ RemoteConnector.prototype.resolve = function(Model) {
|
|||
createProxyMethod(Model, remotes, remoteMethod);
|
||||
}
|
||||
});
|
||||
|
||||
// setup a remoting type converter for this model
|
||||
remotes.defineType(Model.modelName, function(val) {
|
||||
return val ? new Model(val) : val;
|
||||
});
|
||||
};
|
||||
|
||||
function createProxyMethod(Model, remotes, remoteMethod) {
|
||||
|
|
Loading…
Reference in New Issue