$c->stash->{nodes} = [$c->model('QDB::Nodes')->search( {}, { join => { 'sdh_mux_settings' => 'mux_types' }, #'+select' => [ qw/ sdh_mux_settings.ip_address mux_types.mux_type/ ], #'+as' => [ qw/ ip_address mux_type / ], #columns => [qw/foo bar relationship_name.baz #select => [ 'me.net_id', 'me.net_name', \'COUNT(nodes.node_id) as node_count' ], #{ count => 'nodes.node_id' } #as => [qw/ net_id net_name node_count /], #group_by => [qw/ me.net_id me.net_name /], #prefetch => [qw/ sdh_mux_settings /] prefetch => { 'sdh_mux_settings' => 'mux_types' } } )];