Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

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'


Go to End


4 Posts   2471 Views

Avatar
longss

Community Member, 3 Posts

18 November 2014 at 8:50pm

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 !

Avatar
longss

Community Member, 3 Posts

19 November 2014 at 5:47pm

Please help me ! :((((

Avatar
martimiz

Forum Moderator, 1391 Posts

20 November 2014 at 2:42am

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.

Avatar
longss

Community Member, 3 Posts

20 November 2014 at 4:12pm

Does it have no way to do, right? Anyway thank martimiz alot.