* 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
This variant of showqueries will include a backtrace after each query.
This is extremely verbose but can be helpful when diagnosing where
queries have come from.
This is something that I have frequently added as a local hack on my
environment, I figured that exposing it as a formal feature would be
useful.
* Allow use of display names with SwiftMailer
The syntax to allow display names with SwiftMailer is as follow:
`->setFrom(['john@doe.com' => 'John Doe'])`
Just like you set the `Email.admin_email`, you can set the default sender display name through the `Email.admin_email_displayname` configuration setting.
Refs:
- https://swiftmailer.symfony.com/docs/introduction.html#basic-usage
- https://docs.silverstripe.org/en/4/developer_guides/email/#administrator-emails
* Update Email.php
Simpler code using `Email.admin_email` as an associative array
* Update index.md
Added documentation showing how to add an email display name.
The ` $has_one` can be used both for `1-to-1` and `many-to-1` relations, depending on how is configured the inverse mapping on the related class. The documentation seems to suggest that `$has_one` implies a `1-to-1` relation, but then it gives an example of a `many-to-1` relationship. Since we are focusing on `$has_one` I would also put the `Player` class before the `Team` class.
I felt the negation docs didn't cover checking if a value was *not* another value and didn't point out that `not` can't be combined with other operators.
[ci skip]