[Dbix-class] Help with join
Dave Morriss
Dave.Morriss at zen.co.uk
Tue Apr 25 00:09:18 CEST 2006
luke saunders said the following on 24/04/2006 11:02:
> You have to use the relationship name rather than the table name. So in
> your case it should be:
>
> my $rs = $schema->resultset('Company')-
>>search(
> { 'indexes.index_name' => 'ASX300',
> },
> { join => [qw/indexes/],
> }
> );
Hi,
As a raw beginner with DBIC (and not being particularly experienced with
databases) I have had great difficulty working this out too.
The documentation (examples, cookbook, etc) seems always to define the
relationship name and the table name to be the same, which confused the
hell out of me.
I may have missed the clue I needed, but I'd suggest that this fact
could do with more emphasis in the man pages.
--
Dave Morriss, Edinburgh, Scotland
Email: Dave.Morriss at zen.co.uk
More information about the Dbix-class
mailing list