I have a code:
class Products extends DataObject{
static $db = array (
"Title" => "Varchar(255)",
);
static $many_many = array (
'Productss' => 'Products',
);
function getCMSFields($controller = null) {
$fields = parent::getCMSFields();
$Productss = new ManyManyDataObjectManager($this,'Productss','Products',array('Title'=>'Title'));
$TabProductss = new Tab('SP_DK',$Productss);
$fields = new FieldSet(new TabSet("Root",$TabProductss));
return $fields;
}
}
Can you tell me why I use ManyManyComplexTableField is OK but ManyManyDataObjectManager are not?
I can use ManyManyDataObjectManager.
Please help me !
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
DataObjectManager Module /
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
ManyManyDataObjectManager Erro 'Allowed memory size'
Please help me ! :((((
Based on your code I'm thinking this is caused by a never ending loop, because of the Products class many_many relation to itself. Maybe the ComplexTableField can handle this but the ManyManyDataObjectManager just gets lost in repeating itself somewhere?
I guess you are using SilverStripe 2.4 or older - version 2.4 is no longer supported and I don't think UnleCheese is still actively monitoring the DataObjectManager. So if you're still developing, I'd suggest upgrading to 3.1 if at all possible.
Does it have no way to do, right? Anyway thank martimiz alot.