Jump to:

3372 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » ModelAdmin + $summary_fields

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

Page: 1
Go to End
Author Topic: 1033 Views
  • danzzz
    Avatar
    Community Member
    175 Posts

    ModelAdmin + $summary_fields Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: ModelAdmin + $summary_fields Link to this post

    assuming 'Name' is a $db of network

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

    1033 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.