mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Empty FROM clause
This commit is contained in:
parent
5b275376d3
commit
3738d888e0
@ -661,7 +661,7 @@ class DataQuery {
|
||||
$this->query->addLeftJoin($componentBaseClass,
|
||||
"\"$relationTable\".\"$componentField\" = \"$componentBaseClass\".\"ID\"");
|
||||
}
|
||||
if(ClassInfo::hasTable($componentClass)) {
|
||||
if(ClassInfo::hasTable($componentClass) && !$this->query->isJoinedTo($componentClass)) {
|
||||
$this->query->addLeftJoin($componentClass,
|
||||
"\"$relationTable\".\"$componentField\" = \"$componentClass\".\"ID\"");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user