[Dbix-class] Auto-joins

Nilson Santos Figueiredo Junior acid06 at gmail.com
Thu Mar 30 03:28:09 CEST 2006


While reading the documentation I couldn't find any reference
regarding DBIx::Class performing auto-joins. You'd always need to
explicitely specify them.

Is there any reason preventing this from being implemented so that
code like this:

my $rs = $schema->resultset('CD')->search(
    {
      'artist.name' => 'Bob Marley'
    }
);

would work fine?

Or is it already implemented but isn't mentioned anywhere (or is
deeply hidden somewhere I couldn't find)?

I'm aware that this is something ambiguous if a table has more than
one column referencing the same table. But I think that only in this
case explicit joins would be needed. Actually, you could pretty
reasonably make it work even for multi-level joins, provided there's
no ambiguity anywhere.

So... is this a design decision or merely lack of time from the maintainers?

-Nilson Santos F. Jr.



More information about the Dbix-class mailing list