BUGFIX: Explicitly specify the many_many's join table name in the join's ON match statement in ManyManyComplexTableField (from r101608)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112008 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-13 00:51:33 +00:00
parent ac27c7217f
commit 3ac1580aae

View File

@ -37,7 +37,7 @@ class ManyManyComplexTableField extends HasManyComplexTableField {
$sourceField = 'Child';
$parentID = $this->controller->ID;
$this->sourceJoin .= " LEFT JOIN \"$manyManyTable\" ON (\"$source\".\"ID\" = \"{$sourceField}ID\" AND \"{$this->manyManyParentClass}ID\" = '$parentID')";
$this->sourceJoin .= " LEFT JOIN \"$manyManyTable\" ON (\"$source\".\"ID\" = \"$manyManyTable\".\"{$sourceField}ID\" AND \"{$this->manyManyParentClass}ID\" = '$parentID')";
$this->joinField = 'Checked';
}