mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Qualify join table in ON clause in ManyManyList to avoid ambiguous column names
This commit is contained in:
parent
687a1ca72b
commit
2555ccb543
@ -59,7 +59,7 @@ class ManyManyList extends RelationList {
|
|||||||
$baseClass = ClassInfo::baseDataClass($dataClass);
|
$baseClass = ClassInfo::baseDataClass($dataClass);
|
||||||
|
|
||||||
// Join to the many-many join table
|
// Join to the many-many join table
|
||||||
$this->dataQuery->innerJoin($joinTable, "\"$this->localKey\" = \"$baseClass\".\"ID\"");
|
$this->dataQuery->innerJoin($joinTable, "\"$joinTable\".\"$this->localKey\" = \"$baseClass\".\"ID\"");
|
||||||
|
|
||||||
// Query the extra fields from the join table
|
// Query the extra fields from the join table
|
||||||
if($extraFields) $this->dataQuery->selectFromTable($joinTable, array_keys($extraFields));
|
if($extraFields) $this->dataQuery->selectFromTable($joinTable, array_keys($extraFields));
|
||||||
|
Loading…
Reference in New Issue
Block a user