silverstripe-framework/model
stojg efa9ff9b08 API: Queries added by DataList::addInnerJoin() and DataList::leftJoin() come after the base joins, not before.
This bug will surface when using the ORM and adding an join to DataList
where a DataObject inherits another DataObject.

If you for example want to restrict the number of pages that only have a
related Staff object:

    $list = DataList::create('Page')
		->InnerJoin('Staff', '"Staff"."ID" = "Page"."StaffID");

This will create a SQL query where the INNER JOIN is before the
LEFT JOIN of Page and SiteTree in the resulting SQL string. In MySQL
and PostgreSQL this will create an invalid query.

This patch solves the problem by sorting the joins.
2012-12-11 11:04:29 +13:00
..
fieldtypes FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
Aggregate.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
ArrayList.php Revert "BUGFIX: ArrayList now discards keys of the array passed in and keeps the numerically indexed array sequential." 2012-11-30 14:24:03 +01:00
ComponentSet.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
Database.php API Add the ability to query if the schema update is in progress. 2012-10-17 11:45:21 +13:00
DatabaseAdmin.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataDifferencer.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
DataExtension.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataList.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataModel.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
DataObject.php Fixed PHPUnit assertions for incomplete tests in core 2012-11-23 15:16:39 +01:00
DataObjectDecorator.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataObjectInterface.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataObjectSet.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
DataQuery.php API: Queries added by DataList::addInnerJoin() and DataList::leftJoin() come after the base joins, not before. 2012-12-11 11:04:29 +13:00
DB.php BUG Using Session::set() for DB::set_alternative_database_name() 2012-10-15 20:40:38 +02:00
Filterable.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
GroupedList.php Fixed usage of DataList etc in docs (fixes #7518) 2012-06-27 16:09:31 +02:00
HasManyList.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
HiddenClass.php MINOR Update @package values to match renaming sapphire 2012-04-15 10:50:19 +12:00
Hierarchy.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
HTMLValue.php BUG Fixing "+" characters being replaced with whitespace 2012-10-24 14:44:14 +13:00
Image.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
Limitable.php Update docs to indicate lists not mutable as per 7673 2012-07-20 14:51:12 +12:00
List.php FEATURE: implement SS_Sortable->reverse() 2012-04-27 15:54:14 +12:00
ListDecorator.php FEATURE: implement SS_Sortable->reverse() 2012-04-27 15:54:14 +12:00
ManyManyList.php FIX: Fixed ef81318aea for PostgreSQL by quoting fields. 2012-10-03 15:34:39 +13: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 FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
RelationList.php Method visibility according to coding conventions 2012-09-20 10:46:59 +02:00
Sortable.php Update docs to indicate lists not mutable as per 7673 2012-07-20 14:51:12 +12:00
SQLMap.php Scoped deprecation messages (fixes #7645) 2012-07-13 11:37:35 +02:00
SQLQuery.php API: Queries added by DataList::addInnerJoin() and DataList::leftJoin() come after the base joins, not before. 2012-12-11 11:04:29 +13:00
Transliterator.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
URLSegmentFilter.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
ValidationException.php BUGFIX Make sure a message is set on ValidationException objects. 2012-12-05 12:18:36 +10:00
ValidationResult.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00
Versioned.php FIX Remove instances of lines longer than 120c 2012-09-30 17:18:13 +13:00