Merge pull request #3080 from strongloop/feature/warn-on-injectOptionsFromRemoteContext

Warn about injectOptionsFromRemoteContext
This commit is contained in:
Miroslav Bajtoš 2017-01-10 15:38:24 +01:00 committed by GitHub
commit b86eac5cf6
1 changed files with 10 additions and 0 deletions

View File

@ -248,6 +248,16 @@ module.exports = function(registry) {
});
};
if ('injectOptionsFromRemoteContext' in options) {
console.warn(g.f(
'%s is using model setting %s which is no longer available.',
typeName, 'injectOptionsFromRemoteContext'));
console.warn(g.f(
'Please rework your app to use the offical solution for injecting ' +
'"options" argument from request context,\nsee %s',
'http://loopback.io/doc/en/lb3/Using-current-context.html'));
}
// resolve relation functions
sharedClass.resolve(function resolver(define) {
var relations = ModelCtor.relations || {};