Merged revisions 48082 via svnmerge from

http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.1asfonz

........
  r48082 | aoneil | 2008-01-16 16:44:45 +1300 (Wed, 16 Jan 2008) | 2 lines
  
  Allow many-many complex table fields to be used on the reverse side of the join (belongs many many)
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@48539 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-01-24 00:12:42 +00:00
parent 5a20210f7c
commit d34672a260

View File

@ -28,6 +28,12 @@ class ManyManyComplexTableField extends HasManyComplexTableField {
$this->manyManyParentClass = $class;
$manyManyTable = $class . '_' . $this->name;
break;
}
$belongsManyManyRelations = $singleton->uninherited( 'belongs_many_many', true );
if( isset( $belongsManyManyRelations ) && array_key_exists( $this->name, $belongsManyManyRelations ) ) {
$this->manyManyParentClass = $class;
$manyManyTable = $belongsManyManyRelations[$this->name] . '_' . $this->name;
break;
}
}
$source = $this->sourceClass;
@ -101,4 +107,4 @@ class ManyManyComplexTableField_Item extends ComplexTableField_Item {
}
}
?>
?>