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.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

ModelAdmin + $summary_fields


Go to End


2 Posts   1984 Views

Avatar
danzzz

Community Member, 175 Posts

6 November 2010 at 2:28am

hi

I manage 2 models with modeladmin:


// $db array here ...

static $summary_fields = array(
   'owner'
);
	
static $has_one = array(
   'network' => 'network'
);

// ....

how can I add the "network" value from $has_one to the $summary_fields?

daniel

Avatar
swaiba

Forum Moderator, 1899 Posts

6 November 2010 at 3:23am

assuming 'Name' is a $db of network

static $summary_fields = array( 
'owner',
'network.Name' => 'network'
);