Skip to content

Commit

Permalink
BUGFIX Qualify join table in ON clause in ManyManyList to avoid ambig…
Browse files Browse the repository at this point in the history
…uous column names
  • Loading branch information
chillu committed Mar 14, 2012
1 parent 687a1ca commit 2555ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/ManyManyList.php
Expand Up @@ -59,7 +59,7 @@ function __construct($dataClass, $joinTable, $localKey, $foreignKey, $extraField
$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));
Expand Down

0 comments on commit 2555ccb

Please sign in to comment.