(options, validColumnNames)
| 1781 | } |
| 1782 | |
| 1783 | static warnOnInvalidOptions(options, validColumnNames) { |
| 1784 | if (!_.isPlainObject(options)) { |
| 1785 | return; |
| 1786 | } |
| 1787 | |
| 1788 | const unrecognizedOptions = Object.keys(options).filter(k => !validQueryKeywords.has(k)); |
| 1789 | const unexpectedModelAttributes = _.intersection(unrecognizedOptions, validColumnNames); |
| 1790 | if (!options.where && unexpectedModelAttributes.length > 0) { |
| 1791 | logger.warn(`Model attributes (${unexpectedModelAttributes.join(class="st">', ')}) passed into finder method options of model ${this.name}, but the options.where object is empty. Did you forget to use options.where?`); |
| 1792 | } |
| 1793 | } |
| 1794 | |
| 1795 | static _injectDependentVirtualAttributes(attributes) { |
| 1796 | if (!this._hasVirtualAttributes) return attributes; |
no test coverage detected