mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8783 from open-sausages/pulls/4/docs-dataobject-update
DOC Clarify DataObject->update() use
This commit is contained in:
commit
b2e18dda9c
@ -947,9 +947,12 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* The field names can be simple names, or you can use a dot syntax to access $has_one relations.
|
||||
* For example, array("Author.FirstName" => "Jim") will set $this->Author()->FirstName to "Jim".
|
||||
*
|
||||
* update() doesn't write the main object, but if you use the dot syntax, it will write()
|
||||
* Doesn't write the main object, but if you use the dot syntax, it will write()
|
||||
* the related objects that it alters.
|
||||
*
|
||||
* When using this method with user supplied data, it's very important to
|
||||
* whitelist the allowed keys.
|
||||
*
|
||||
* @param array $data A map of field name to data values to update.
|
||||
* @return DataObject $this
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user