mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: groupby works for SQLite too
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97985 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
cce52a59d2
commit
15e98877f5
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user