Ah, after adding "join => 'team'" (and tweaking fields to distinguish me.*
items) that did the trick, thanks!

    $team_ids = [
        map { "me.team" => $_ } @id_list
    ];
    my $users = $c->model('My::User')
        ->search_rs( $team_ids, {
            join     => 'team',
            order_by => [ qw/team.name me.lastname me.firstname/ ],
        } );

Excellent, thanks!


On Sat, Jun 12, 2010 at 2:11 PM, Octavian Rasnita <[email protected]>wrote:

> You can use an order_by block like:
>
> order_by => [
> {-asc => 'team.name'},
> {-asc => 'me.lastname'},
> {-asc => 'me.firstname'},
> ],
>
> Or, if there is -asc for everyone, you can use:
>
> order_by => ['team.name', 'me.firstname', 'me.lastname'],
>
> In the order_by blocks you need to use the names of the columns as they are
> used in the generated SQL query. For finding those names, use
> $ENV{DBIC_TRACE}++.
>
> HTH.
>
> Octavian
>
>
> _______________________________________________
> List: [email protected]
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>



-- 
will trillich
"I think it would be worse to expect nothing than to be disappointed." --
Anne (with an 'e') Shirley
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to