I tried this, and in this case I get: [error] DBIx::Class::Row::get_column(): No such column 'h1'
so in this case it is not executing prefetch 2013/1/21 Charlie Garrison <garri...@zeta.org.au> > Good afternoon, > > On 21/01/13 at 5:39 PM -0300, Paula <mpmagari...@gmail.com> wrote: > > >2013/1/21 Dagfinn Ilmari Mannsåker <ilm...@ilmari.org> > > > >> ->search($where, { %{$attr}, prefetch => 'mc', join => 'mt' }); > > > > > >I have just tried that, and again I get: > >[error] DBIx::Class::Row::get_column(): No such column 'h1' > > > >It seems the order is important, the last argument (prefetch or join) is > >the only one that is executed... > > Correct, since standard perl behaviour says there is only one key in a > hash. > > Assuming $attr->{join} is currently a string (if already arrayref then > just push onto it): > > $attr->{join} = [$attr->{join}, 'mt']; > $attr->{prefetch} = [$attr->{prefetch}, 'mc']; > search($where, $attr}); > > > Charlie > > -- > Ꮚ Charlie Garrison ♊ <garri...@zeta.org.au> > > O< ascii ribbon campaign - stop html mail - www.asciiribbon.org > 〠 http://www.ietf.org/rfc/rfc1855.txt > > > _______________________________________________ > 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/dbix-class@lists.scsys.co.uk >
_______________________________________________ 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/dbix-class@lists.scsys.co.uk