Skip to content

Commit

Permalink
Add note about initialValues mutation to create() and createEach() …
Browse files Browse the repository at this point in the history
…doc pages
  • Loading branch information
eashaw committed Jun 16, 2023
1 parent 59b9644 commit ed6bf2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/reference/waterline/models/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ or
|---|:--------------------|------------------------------|:--------------------------------------|
| 1 | initialValues | ((dictionary)) | The initial values for the new record. _(Note that, if this model is in ["schemaful" mode](https://sailsjs.com/documentation/concepts/models-and-orm/model-settings#?schema), then any extraneous keys will be silently omitted.)_

> **Note**: For performance reasons, as of Sails v1.0 / Waterline 0.13, the `initialValues` dictionary passed into this model method will be mutated in-place in most situations (whereas in Sails/Waterline v0.12, this was not necessarily the case).
##### Result

| Type | Description |
Expand Down
1 change: 1 addition & 0 deletions docs/reference/waterline/models/createEach.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ or
|---|:--------------------|----------------------------------------------|:-----------------------------------|
| 1 | initialValues | ((array?)) | An array of dictionaries with attributes for the new records.

> **Note**: For performance reasons, as of Sails v1.0 / Waterline 0.13, the dictionaries in the `initialValues` array passed into this model method will be mutated in-place in most situations (whereas in Sails/Waterline v0.12, this was not necessarily the case).

##### Result
Expand Down

0 comments on commit ed6bf2e

Please sign in to comment.