[Catalyst] Problem with prefetch DBIX::Class

J. Shirley jshirley at gmail.com
Fri Aug 13 13:25:27 GMT 2010

On Fri, Aug 13, 2010 at 4:51 AM, Marc Perez <markkus.80 at gmail.com> wrote:
> Hi,
> Do you thinks is there another possibility to find a solution o test
> other aspects to solve this?
> Thanks very much
> Marc

First, there's a DBIx::Class mailing list for DBIC questions, which
this is.  It has nothing to do with Catalyst and is better asked

Second, you are calling a method on a result set.  Not a row, so
->name wouldn't work.

while( my $file = $files->next() ) {
    # $files is a resultset, iterate and get $file which is a row

    # Now look at the 'has_many'.
    my $fieldfiles = $file->fieldfiles; # this is 'has_many', so it
returns a resultset
    while ( my $fieldfile = $fieldfiles->next ) {
        # Now you have a row, so you can call methods
        print $fieldfile->name;

Any follow up questions would be best directed to the DBIC mailing
list, however.


More information about the Catalyst mailing list