mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX: Re-order the has_one items in RelatedPageLink so that the correct one is used as the SiteTree.RelatedPages foreign key. (from r88946)
This commit is contained in:
parent
2012a2b879
commit
5779701814
@ -9,8 +9,12 @@ class RelatedPageLink extends DataObject {
|
||||
);
|
||||
|
||||
static $has_one = array(
|
||||
'RelatedPage' => 'SiteTree',
|
||||
// Note: The *last* matching has_one relation to SiteTree is used as the link field for the
|
||||
// has_many (RelatedPages) on SiteTree. This isn't obvious and the framework could be
|
||||
// extended in a future version to allow for explicit selection of a has_one relation to
|
||||
// bind a has_many to.
|
||||
'MasterPage' => 'SiteTree',
|
||||
'RelatedPage' => 'SiteTree'
|
||||
);
|
||||
|
||||
function getCMSFields() {
|
||||
|
Loading…
Reference in New Issue
Block a user