mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX Declaring has_many "Versions" relationship according to decorated class in Versioned->extraStatics()
This commit is contained in:
parent
67cc18f5bf
commit
502131171b
@ -95,13 +95,13 @@ class Versioned extends DataObjectDecorator {
|
|||||||
$this->liveStage = array_pop($stages);
|
$this->liveStage = array_pop($stages);
|
||||||
}
|
}
|
||||||
|
|
||||||
function extraStatics() {
|
function extraStatics($class) {
|
||||||
return array(
|
return array(
|
||||||
'db' => array(
|
'db' => array(
|
||||||
'Version' => 'Int',
|
'Version' => 'Int',
|
||||||
),
|
),
|
||||||
'has_many' => array(
|
'has_many' => array(
|
||||||
'Versions' => 'SiteTree',
|
'Versions' => $class,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user