MCPcopy Index your code
hub / github.com/sequelize/sequelize / warnOnInvalidOptions

Method warnOnInvalidOptions

src/model.js:1843–1853  ·  view source on GitHub ↗
(options, validColumnNames)

Source from the content-addressed store, hash-verified

1841 }
1842
1843 static warnOnInvalidOptions(options, validColumnNames) {
1844 if (!_.isPlainObject(options)) {
1845 return;
1846 }
1847
1848 const unrecognizedOptions = Object.keys(options).filter(k => !validQueryKeywords.has(k));
1849 const unexpectedModelAttributes = _.intersection(unrecognizedOptions, validColumnNames);
1850 if (!options.where && unexpectedModelAttributes.length > 0) {
1851 logger.warn(`Model attributes (${unexpectedModelAttributes.join(', ')}) passed into finder method options of model ${this.name}, but the options.where object is empty. Did you forget to use options.where?`);
1852 }
1853 }
1854
1855 static _injectDependentVirtualAttributes(attributes) {
1856 if (!this._hasVirtualAttributes) return attributes;

Callers 2

findAllMethod · 0.95
find-all.test.jsFile · 0.80

Calls 2

warnMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected