BUGFIX: fixed ManyMany relation for same object

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61292 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2008-08-21 05:30:49 +00:00
parent 5689ec0caa
commit e085ee19d7

View File

@ -33,7 +33,7 @@ class ManyManyComplexTableField extends HasManyComplexTableField {
$tableClasses = ClassInfo::dataClassesFor($this->sourceClass); $tableClasses = ClassInfo::dataClassesFor($this->sourceClass);
$source = array_shift($tableClasses); $source = array_shift($tableClasses);
$sourceField = $this->sourceClass; $sourceField = $this->sourceClass;
if($this->manyManyParentClass == $source) if($this->manyManyParentClass == $sourceField)
$sourceField = 'Child'; $sourceField = 'Child';
$parentID = $this->controller->ID; $parentID = $this->controller->ID;