silverstripe/sapphire — pull request #465 by halkyon (2012-05-19 03:29:04+00:00)
Title: DataList aggregate fixes

`DataObject::Aggregate()` and `DataObject::RelationshipAggregate()` have been deprecated, because DataList/RelationList now support aggregates directly.

I've added `Max`, `Min`, `Avg` and `Sum` in the global template context, so you can query an aggregate on any data class within the template, so it would look something like `<% cached Max(Page,LastEdited) %>`, this replaces the existing `<% cached Aggregate(Page).Max(LastEdited) %>`

AggregateTest is effectively deprecated, but it's left there until we've removed `DataObject::Aggregate` and `DataObject::RelationshipAggregate`. We'll probably want to merge the tests into `DataListTest` and `RelationListTest` where appropriate.

Documentation has been updated accordingly in partial-caching.md and 3.0.0.md upgrading guide.