On Thu, Feb 19, 2009 at 10:35 AM, Bernhard Graf <[email protected]> wrote:

> Is it possible to specify the join type for the result set?
>
> E.g. I have a user who might have several items, but I want only those
> users, that actually have items.
>
> E.g. this gives me a left join:
>
> $schema->resultset('User')->search(
>  {},
>  {
>     join => 'items'
>     group_by => 'me.id',
>  }
> );
>

something like this i think is what you're after...

$schema->resultset('User')->search(
 { items.id => { '!=' => undef },
 {
    join => 'items'
    group_by => 'me.id',
 }
);


michael
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to