I Just wanted to display a ManyMany-Relation with the ManyManyDataObjectManager.
But I always get following error:
Fatal error: Access to undeclared static property: ViewableData::$many_many in ~\sapphire\core\Object.php(376) : eval()'d code on line 1
My DataObject looks like this:
class ContentDataObject extends DataObject {
static $db = array (
"Title" => "Varchar(255)",
//...
);
static $many_many = array (
"Connections" => "ArticleDataObject",
);
static $belongs_many_many = array (
"ConnectionsBelongs" => "ContentDataObject",
);
}
The Manager in the Page looks like this (If I replace "ManyManyDataObjectManager" with "DataObjectManager" is working):
$manager = new ManyManyDataObjectManager(
$this,
'CurrentContent',
'ContentDataObject',
$this->getListedFields(),
'getCMSFields_forPopup'
);
return $manager;
System:
SS 2.3.1
dataobject_manager r117
Any ideas how to solve the error?
Cheers,
Malte