mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Remove reference to database_fields
This commit is contained in:
parent
46ce733b9a
commit
5b48a9a07b
@ -1186,11 +1186,6 @@ been removed.
|
|||||||
Instead, to get all database fields for a dataobject, including base fields (such as ID, ClassName, Created, and LastEdited), use `DataObject::getSchema()->databaseFields($className, $aggregate = true)`.
|
Instead, to get all database fields for a dataobject, including base fields (such as ID, ClassName, Created, and LastEdited), use `DataObject::getSchema()->databaseFields($className, $aggregate = true)`.
|
||||||
To omit the base fields, pass a value of `false` as the `$aggregate` parameter, e.g. `DataObject::getSchema()->databaseFields(Member::class, false)`.
|
To omit the base fields, pass a value of `false` as the `$aggregate` parameter, e.g. `DataObject::getSchema()->databaseFields(Member::class, false)`.
|
||||||
|
|
||||||
`DataObject::database_fields` does not have a second parameter anymore, and can be called directly on an object
|
|
||||||
or class. E.g. `Member::database_fields()`.
|
|
||||||
If user code requires the list of fields excluding base fields, then use custom_database_fields instead, or
|
|
||||||
make sure to call `unset($fields['ID']);` if this field should be excluded.
|
|
||||||
|
|
||||||
Composite database fields are omitted from the `databaseFields()` method. To get those, use `DataObject::getSchema()->compositeFields($className, $aggregate = true)`.
|
Composite database fields are omitted from the `databaseFields()` method. To get those, use `DataObject::getSchema()->compositeFields($className, $aggregate = true)`.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user