mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-29 20:59:23 +02:00
DOC Clarify DataObject->update() use
This commit is contained in:
parent
3d5c330e17
commit
a78573b517
@ -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.
|
* 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".
|
* 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.
|
* 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.
|
* @param array $data A map of field name to data values to update.
|
||||||
* @return DataObject $this
|
* @return DataObject $this
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user