silverstripe-framework/tests/model
Sean Harvey 95bb799e6f BUG Fixing SQLQuery::aggregate() adding ORDER BY when no limit.
DataQuery::initialiseQuery() will add a default sort to a query,
and when calling up an aggregate it will make a query like this
which doesn't make sense:

SELECT MAX("LastEdited") FROM "Member" ORDER BY "ID"

In this case there is no need to add the ORDER BY, and it will
break databases like MSSQL in cases such as
GenericTemplateGlobalProvider
which provides a default List() function for adding aggregates
into SSViewer template cacheblocks.

If we add a limit, however, then it does make sense:

SELECT MAX("LastEdited") FROM "Member" ORDER BY "ID" LIMIT 10

This fixes SQLQuery::aggregate() to NOT add an ORDER BY to an
aggregate call if there is no limit.
2013-09-06 18:11:11 +12:00
..
testimages ENHANCEMENT: use image file name (without file path and extension) for alt attribute when title is not provided 2009-05-24 12:16:17 +00:00
AggregateTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
AggregateTest.yml FEATURE: Add aggregate calculation to DataObject, allowing (cached) calculation of Max, Min, Count, Avg, etc (from r97390) 2010-04-12 05:04:34 +00:00
ArrayListTest.php Preempt fatal errors when making some function calls on an empty ArrayList 2013-08-05 15:47:58 +12:00
ComponentSetTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
ComponentSetTest.yml MINOR Added ComponentSetTest 2010-02-22 04:37:32 +00:00
CompositeDBFieldTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
CurrencyTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DatabaseTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DataDifferencerTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DataDifferencerTest.yml API-CHANGE sapphire folder can now be renamed. 2012-04-15 10:50:19 +12:00
DataExtensionTest.php NEW Added beforeExtending, afterExtending, and beforeUpdateCMSFields to allow user code better control over interaction with extending methods 2013-05-16 10:34:45 +12:00
DataExtensionTest.yml API CHANGE: Renamed DataObjectDecorator to DataExtension. 2011-04-26 11:01:38 +10:00
DataListTest.php FIX: Remove limit on GridField export 2013-08-05 19:59:12 +12:00
DataObjectDuplicationTest.php BUG Correct relation saving in DataObject->duplicateRelations() 2013-06-03 15:57:20 +02:00
DataObjectLazyLoadingTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DataObjectSchemaGenerationTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DataObjectTest_Namespaced.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DataObjectTest.php FIX Recent patch to DataObject#db changed API which broke core 2013-07-05 10:11:35 +12:00
DataObjectTest.yml API Allow $summary_fields to support methods on DBFields 2013-06-13 09:41:24 +12:00
DataQueryTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DateTest.php Less far-future date assertions, seems to throw off some PHP installs 2012-12-14 11:25:24 +01:00
DatetimeTest.php Less far-future date assertions, seems to throw off some PHP installs 2012-12-14 11:25:24 +01:00
DbDatetimeTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DbDatetimeTest.yml MINOR Removed dependency on SiteTree in various unit tests 2011-03-29 18:07:58 +13:00
DBFieldTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
DBLocaleTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
DBTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DecimalTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DecimalTest.yml API CHANGE Rearranged files in sapphire to reflect core dependencies more accurately, and have the tests/ folder mirror its folder structure 2011-03-31 09:56:21 +13:00
GDImageTest.php NEW: Enable multiple image manipulation back-ends on the Image class 2012-11-03 19:38:09 -07:00
GroupedListTest.php MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
HasManyListTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
HierarchyTest.php NEW Enforce max node counts to avoid excessive resource usage 2013-04-09 10:24:18 +12:00
HierarchyTest.yml NEW Enforce max node counts to avoid excessive resource usage 2013-04-09 10:24:18 +12:00
HTMLTextTest.php Correct line length and indentation 2013-08-21 18:54:05 +12:00
ImageTest.php BUG Cached images stored in wrong folder 2013-08-26 10:16:42 +02:00
ImageTest.yml MINOR Fixing broken test on Windows 2012-05-04 22:48:47 +12:00
ImagickImageTest.php NEW: Enable multiple image manipulation back-ends on the Image class 2012-11-03 19:38:09 -07:00
LabelFieldTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
ManyManyListTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
MapTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
MoneyTest.php Merge remote-tracking branch 'origin/3.0' into 3.1 2013-05-09 10:34:20 +02:00
MoneyTest.yml Added test for lazy-loading edge-case in Money field. 2013-04-22 11:50:57 +12:00
MySQLDatabaseTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
PaginatedListTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
PercentageTest.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
SQLQueryTest.php BUG Fixing SQLQuery::aggregate() adding ORDER BY when no limit. 2013-09-06 18:11:11 +12:00
SQLQueryTest.yml BUG SQLQuery::aggregate() with limit, groupBy and orderBy (fixes #8148) 2012-12-21 15:20:59 +01:00
StringFieldTest.php FIX: Convert newlines to <br /> tags in string fields (fixes #1942) 2013-05-30 09:26:58 +01:00
TextTest.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
TransactionTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
UnsavedRelationListTest.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
UnsavedRelationListTest.yml NEW: Allows setting of has_many and many_many relations before writing 2012-11-28 09:37:08 +13:00
URLSegmentFilterTest.php BUG Fixes issue with '+' characters in url. 2013-05-10 16:16:31 +12:00
ValidationExceptionTest.php Correct line length and indentation 2013-08-21 18:54:05 +12:00
VersionedTest.php FIX: Remove version field from default scaffolded CMS fields. 2013-05-21 22:47:54 +12:00
VersionedTest.yml MINOR Removed dependency on SiteTree in various unit tests 2011-03-29 18:07:58 +13:00