(options, validColumnNames)
| 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; |
no test coverage detected