DOC Clarify DataObject->update() use

This commit is contained in:
Ingo Schommer 2019-02-04 20:47:27 +13:00
parent 3d5c330e17
commit a78573b517

View File

@ -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
*/