From 98de6165ea3991ff367ffb3acda1441592a0e31f Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 13 Apr 2010 01:46:51 +0000 Subject: [PATCH] MINOR: groupby works for SQLite too (from r97985) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102563 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/DataObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/model/DataObject.php b/core/model/DataObject.php index b604ad854..f7c762a46 100755 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -2569,7 +2569,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity if($join) { $query->from[] = $join; - if(DB::getConn() instanceof MySQLDatabase) { + if(DB::getConn() instanceof MySQLDatabase || DB::getConn() instanceof SQLite3Database) { // TODO: This needs to be resolved for all databases $query->groupby[] = reset($query->from) . ".\"ID\""; /* this needs to be fixed - this doesn't work when you add additional fields from other tables into the mix.