sub get_latest_by_category { my ( $self, $id, $rows ) = @_; return $self->search( { 'category.id' => $id, 'me.published' => 1, }, { join => { 'artist_categories' => 'category' }, order_by => { -desc => 'me.created' }, rows => $rows, } ); }