silverstripe-framework/tests/php/ORM
Sam Minnée 5b7a84141b NEW: Add Hierarchy::prepopulate_numchildren_cache() (#8380)
* 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
2018-09-25 12:25:23 +12:00
..
ArrayListTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
CascadeDeleteTest API Implement cascade_deletes 2017-08-09 15:14:00 +12:00
ComponentSetTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DatabaseTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DataExtensionTest BUG Implement or exclude all pending upgrader deltas 2017-07-03 12:21:47 +12:00
DataObjectDuplicationTest Merge branch '4.0' into 4.1 2018-06-08 23:05:24 +01:00
DataObjectSchemaGenerationTest Merge branch '3' into 4 2018-01-16 11:47:39 +00:00
DataObjectSchemaTest NEW Allow index type to be configured per DBField instance 2017-07-17 14:36:47 +12:00
DataObjectTest Merge remote-tracking branch 'origin/4.0' into 4 2018-01-22 14:57:05 +13:00
DataQueryTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DBClassNameTest API Split out SilverStripe\ORM\Versioned into new module 2017-03-27 11:03:39 +13:00
DBCompositeTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DBHTMLTextTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DBMoneyTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DBStringTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DBVarcharTest ENHANCEMENT Ensure DBVarchar scaffolds text field with TextField with appropriate max length 2017-10-26 16:21:51 +13:00
DecimalTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
Filters NEW Move index generation to DataObjectSchema and solidify index spec 2017-05-25 23:29:12 +01:00
HasManyListTest Merge branch '3' 2017-06-28 18:59:08 +01:00
HierarchyTest API Major refactor of Hierarchy into MarkedSet 2017-04-13 16:27:13 +12:00
ManyManyListTest Merge branch '3' 2017-06-28 18:59:08 +01:00
ManyManyThroughListTest BUG Backport bugfix for belongs_many_many with many_many through. 2018-06-06 09:43:04 +12:00
MySQLDatabaseTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
Search ENHANCEMENT Ensure DBVarchar scaffolds text field with TextField with appropriate max length 2017-10-26 16:21:51 +13:00
SQLInsertTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
SQLSelectTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
SQLUpdateTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
TransactionTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
UnsavedRelationListTest Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
ArrayLibTest.php BUG Remove usage of deprecated each() and use a helper method instead 2017-11-01 16:04:35 +13:00
ArrayListTest.php Lazy-load custom methods and extensions on CustomMethods and Extensible traits 2017-08-22 15:47:24 +12:00
CascadeDeleteTest.php API Rename assert dos to assert list 2017-10-09 11:53:11 +13:00
CascadeDeleteTest.yml API Implement cascade_deletes 2017-08-09 15:14:00 +12:00
ComponentSetTest.php Remove TestListener and rely on PHPUnits APIs 2017-03-30 11:46:58 +13:00
ComponentSetTest.yml
DatabaseTest.php Remove TestListener and rely on PHPUnits APIs 2017-03-30 11:46:58 +13:00
DataExtensionTest.php API Rename assert dos to assert list 2017-10-09 11:53:11 +13:00
DataExtensionTest.yml
DataListTest.php API Add excludeAny() and tests for complicated excludes/filters (#7838) 2018-02-08 09:20:17 +13:00
DataObjectDuplicationTest.php Merge branch '3.6' into 4.0 2018-06-08 14:41:04 +01:00
DataObjectDuplicationTest.yml API Implement cascade_duplications 2018-02-05 12:04:57 +13:00
DataObjectLazyLoadingTest.php Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
DataObjectSchemaGenerationTest.php Merge branch '3' into 4 2018-01-16 11:47:39 +00:00
DataObjectSchemaTest.php Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
DataObjectTest.php Merge branch '4.1' into 4.2 2018-07-13 16:44:23 +01:00
DataObjectTest.yml API Ensure that all DataQuery joins are aliased based on relationship name 2017-05-26 13:38:58 +12:00
DataQueryTest.php NEW Add columnUnique API SS_List classes. 2018-07-16 12:16:17 +01:00
DataQueryTest.yml
DBClassNameTest.php API Add getShortName to DBClassName 2017-11-15 11:27:58 +13:00
DBCompositeTest.php BUG Implement or exclude all pending upgrader deltas 2017-07-03 12:21:47 +12:00
DBCurrencyTest.php Change DBCurrency scaffolded form field to CurrencyField (fixes #8246) 2018-07-09 10:57:01 +12:00
DBDateTest.php Merge pull request #7794 from kinglozzer/id-like-to-place-an-ordinal 2018-01-26 09:27:46 +13:00
DBDatetimeTest.php Respect semver and add tests 2018-06-15 11:04:12 +12:00
DBEnumTest.php BUG Fix DBEnum ignoring empty defaults 2017-11-17 12:35:39 +13:00
DBFieldTest.php API exists() no longer true for nullifyIfEmpty if empty string 2017-04-04 10:20:08 +12:00
DBHTMLTextTest.php Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
DBLocaleTest.php API Substitute Zend_Currency with NumberFormatter based solution 2017-02-09 15:28:59 +13:00
DBMoneyTest.php Remove flakey swedish intl test 2017-05-08 21:31:14 +12:00
DBMoneyTest.yml
DBPercentageTest.php Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DBStringTest.php Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
DBTest.php Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
DBTextTest.php Fix "mb_stripos(): Empty delimiter" warning when no search-keywords are given for DBText::ContextSummary. 2018-03-01 11:39:30 +01:00
DBTimeTest.php Cleanup SapphireTest and time related tests (#6898) 2017-05-18 22:01:55 +12:00
DBVarcharTest.php ENHANCEMENT Ensure DBVarchar scaffolds text field with TextField with appropriate max length 2017-10-26 16:21:51 +13:00
DBYearTest.php Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
DecimalTest.php BUG Fix decimal scaffolding 2017-10-10 10:13:26 +13:00
DecimalTest.yml
GroupedListTest.php Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
HasManyListTest.php Merge branch '3' 2017-06-28 18:59:08 +01:00
HasManyListTest.yml Merge branch '3' 2017-06-28 18:59:08 +01:00
HierarchyCachingTest.php NEW: Add Hierarchy::prepopulate_numchildren_cache() (#8380) 2018-09-25 12:25:23 +12:00
HierarchyTest.php API Refactor bootstrap, request handling 2017-06-22 22:50:45 +12:00
HierarchyTest.yml
LabelFieldTest.php Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
ManyManyListExtensionTest.php API Remove Object class 2017-05-23 13:50:35 +12:00
ManyManyListExtensionTest.yml
ManyManyListTest.php Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
ManyManyThroughListTest.php NEW Add getJoinTable to MMTL 2018-05-14 11:19:24 +01:00
ManyManyThroughListTest.yml API Implement many_many through polymorphic (from only) (#7928) 2018-03-22 10:26:25 +13:00
MapTest.php API Refactor bootstrap, request handling 2017-06-22 22:50:45 +12:00
MarkedSetTest.php API Refactor bootstrap, request handling 2017-06-22 22:50:45 +12:00
MySQLDatabaseTest.php BUG Implement or exclude all pending upgrader deltas 2017-07-03 12:21:47 +12:00
MySQLDatabaseTest.yml
PaginatedListTest.php API Rename assert dos to assert list 2017-10-09 11:53:11 +13:00
PDODatabaseTest.php BUG Fix postgres / PDO support 2017-11-17 12:35:55 +13:00
PolymorphicHasManyListTest.php API Refactor bootstrap, request handling 2017-06-22 22:50:45 +12:00
SQLInsertTest.php Remove TestListener and rely on PHPUnits APIs 2017-03-30 11:46:58 +13:00
SQLSelectTest.php Fixing string concat CS issues 2018-01-16 18:39:30 +00:00
SQLSelectTest.yml
SQLUpdateTest.php Remove TestListener and rely on PHPUnits APIs 2017-03-30 11:46:58 +13:00
SQLUpdateTest.yml
TransactionTest.php FIX Add Nested DB transaction support (#7848) 2018-02-09 10:28:32 +13:00
UnsavedRelationListTest.php API Rename assert dos to assert list 2017-10-09 11:53:11 +13:00
UnsavedRelationListTest.yml
URLSegmentFilterTest.php Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
ValidationExceptionTest.php Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00
ValidationResultTest.php Apply PSR2 / Namespace to remaining admin / tests 2016-12-19 16:08:19 +13:00