silverstripe-framework/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
..
fieldtypes Typo 2013-07-12 15:07:43 +12:00
Aggregate.php Deprecate Aggregate and DataObject::getComponentsQuery 2013-07-08 15:27:13 +12:00
ArrayList.php Merge pull request #2294 from wilr/fixgridexport 2013-08-20 14:08:18 -07:00
Database.php Merge remote-tracking branch 'origin/3.0' into 3.1.0 2013-08-22 12:55:47 +02:00
DatabaseAdmin.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
DataDifferencer.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
DataExtension.php Revert "FIX make augmentSQL API consistent for strict PHP" 2013-06-01 11:51:01 +12:00
DataList.php FIX: Remove limit on GridField export 2013-08-05 19:59:12 +12:00
DataModel.php Update @package, @subpackage labels 2013-05-21 22:24:41 +12:00
DataObject.php Deprecate Aggregate and DataObject::getComponentsQuery 2013-07-08 15:27:13 +12:00
DataObjectInterface.php Removing deprecated instance_get_one() and instance_get() 2012-11-15 14:43:19 +13:00
DataQuery.php FIX: Add missing 'groupby' and remove redundant conditional in 'having' 2013-05-29 22:19:39 +01:00
DB.php Fixed whitespace usage 2013-02-18 15:43:52 +01:00
Filterable.php API Make DataList and ArrayList immutable 2012-12-14 13:30:35 +13:00
GroupedList.php Fixed usage of DataList etc in docs (fixes #7518) 2012-06-27 16:09:31 +02:00
HasManyList.php Update @package, @subpackage labels 2013-05-21 22:24:41 +12:00
HiddenClass.php MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Hierarchy.php Merge remote-tracking branch 'origin/3.1.0' into 3.1 2013-08-22 13:00:25 +02:00
HTMLValue.php FIX We still need XML escaping on href attributes in HTML4Value 2013-04-18 09:13:24 +12:00
Image_Backend.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
Image.php BUG Cached images stored in wrong folder 2013-08-26 10:16:42 +02:00
Limitable.php API Make DataList and ArrayList immutable 2012-12-14 13:30:35 +13:00
List.php NEW: Add new method "each" to SS_List and core implementors thereof 2012-11-02 18:21:02 -07:00
ListDecorator.php NEW: Add new method "each" to SS_List and core implementors thereof 2012-11-02 18:21:02 -07:00
ManyManyList.php Update @package, @subpackage labels 2013-05-21 22:24:41 +12:00
Map.php return $this, for do things like this: new DropdownField('XPTOName', 'XPTO Label', XPTOModel::get()->map("ID", "Name")->unshift(0,'- Select -')) 2012-11-30 01:37:36 +00:00
MySQLDatabase.php UTF8 defaults for MySQLDatabase->createDatabase() 2013-08-15 12:49:15 +02:00
RelationList.php Update @package, @subpackage labels 2013-05-21 22:24:41 +12:00
Sortable.php API Make DataList and ArrayList immutable 2012-12-14 13:30:35 +13:00
SQLMap.php Scoped deprecation messages (fixes #7645) 2012-07-13 11:37:35 +02:00
SQLQuery.php BUG Fixing SQLQuery::aggregate() adding ORDER BY when no limit. 2013-09-06 18:11:11 +12:00
Transliterator.php API Marked statics private, use Config API instead (#8317) 2013-03-24 17:20:53 +01:00
UnsavedRelationList.php Merge pull request #1992 from jthomerson/fix_unsaved_relation_list_constructor 2013-05-24 15:19:19 -07:00
URLSegmentFilter.php BUG Fixes issue with '+' characters in url. 2013-05-10 16:16:31 +12:00
ValidationException.php BUG Enforced requirement that ValidationException::getResult() is expected to consistently produce a valid ValidationResult object. 2013-03-15 13:56:43 +13:00
ValidationResult.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
Versioned.php ENHANCEMENT: allow disabling of Versioned prepopulate_versionnumber_cache 2013-06-04 13:43:58 +00:00