(valueSets, options)
| 2177 | } |
| 2178 | |
| 2179 | static bulkBuild(valueSets, options) { |
| 2180 | options = { isNewRecord: true, ...options }; |
| 2181 | |
| 2182 | if (!options.includeValidated) { |
| 2183 | this._conformIncludes(options, this); |
| 2184 | if (options.include) { |
| 2185 | this._expandIncludeAll(options); |
| 2186 | this._validateIncludedElements(options); |
| 2187 | } |
| 2188 | } |
| 2189 | |
| 2190 | if (options.attributes) { |
| 2191 | options.attributes = options.attributes.map(attribute => Array.isArray(attribute) ? attribute[1] : attribute); |
| 2192 | } |
| 2193 | |
| 2194 | return valueSets.map(values => this.build(values, options)); |
| 2195 | } |
| 2196 | |
| 2197 | /** |
| 2198 | * Builds a new model instance and calls save on it. |
no test coverage detected