mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
5a20210f7c
commit
d34672a260
@ -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 {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user