- or download this
my $db= $c->model('DB');
my $rs= $db->resultset('OtherThing');
- or download this
sub otherthing {
my $self= shift;
my $rs= $self->model('DB')->resultset('OtherThing');
return @_? $rs->find(shift) : $rs
}
- or download this
$c->otherthing($id); # fetch an OtherThing row by primary key
$c->otherthing->search_rs(...)->all # convenient access to resultset