From 2555ccb543b8f819ff6ccbfa8ff00018f69225ce Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 14 Mar 2012 17:03:29 +0100 Subject: [PATCH] BUGFIX Qualify join table in ON clause in ManyManyList to avoid ambiguous column names --- model/ManyManyList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/ManyManyList.php b/model/ManyManyList.php index 70fd32245..ebb3048ee 100644 --- a/model/ManyManyList.php +++ b/model/ManyManyList.php @@ -59,7 +59,7 @@ class ManyManyList extends RelationList { $baseClass = ClassInfo::baseDataClass($dataClass); // 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 if($extraFields) $this->dataQuery->selectFromTable($joinTable, array_keys($extraFields));