Christopher Heschong <[EMAIL PROTECTED]> [27-01-2007 03:53]:
> So I have this code:
>
> my $rs = $self->search_related('watching', {},
> {
> select => [
> { distinct => 'item.id' }
> ],
> prefetch => { person => { relations => 'item' } },
[...]
> $thing = $rs->first;
[...]
> $thing->person->title; # works
> $thing->item->title; # Can't locate object method "item"
If person->has_many(relations), that'll be:
($thing->person->relations)[0]->item->title
But I'm not sure if it works with select => [].
--
Radosław Zieliński <[EMAIL PROTECTED]>
eo Networks
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/