mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-08 02:31:35 +02:00
* NEW: Add Hierarchy::prepopulate_numchildren_cache() API: Hierarchy::stageChildren() customisations must be applied to the base class and not include record-specific behaviour. Adds the ability to prepopulate the cache for Hierarchy::numChildren() in a batch. Note that this optimisation means that stageChildren() is not called on each record in order to calculate numChildren(). This means that the structure of the stageChildren() query must be the same for all records and the behaviour cannot be customised only for a subclass of the base data class. For example, apply your customisations to SiteTree and not a subclass. This is an useful part of optimising the query count on tree generation. See https://github.com/silverstripe/silverstripe-framework/issues/8379 * NEW: Add Hierarchy::prepopulateTreeDataCache() This provides a more extensible way of preopulating caches for optimised tree generation. Fixes https://github.com/silverstripe/silverstripe-framework/issues/8391
749 B
749 B
4.3.0
Overview
DataList::column()
now returns all values and not just "distinct" values from a column as per the API docsDataList
,ArrayList
andUnsavedRalationList
all havecolumnUnique()
method for fetching distinct column values- Take care with
stageChildren()
overrides.Hierarchy::numChildren()
results will only make use ofstageChildren()
customisations that are applied to the base class and don't include record-specific behaviour.
Upgrading
Fetching distinct column values on DataList
Prior to this release DataList
would erroneously return a distinct list of values from a column on an object.
If this behaviour is still required, please use columnUnique()
instead.