Hi! Thank you for your answer. Unfortunately neither of the 2 possibilities work. In both cases I get the same error: [error] DBIx::Class::Row::get_column(): No such column 'h1'
2013/1/18 Patrick Meidl <pme...@ist.ac.at> > On Fri, Jan 18 2013, mpm <mpmagari...@gmail.com> wrote: > > > push @{ $attr->{join} }, 'mt'; > > push @{ $attr->{join} }, 'mc'; > > my $rs1 = $c->model('weight::Mdata')->search( $where, $attr,{prefetch => > > 'mc'}); > > I think your curly braces are misplaced. this should do what you want: > > my $rs1 = $c->model('weight::Mdata')->search($where, > { %$attr, prefetch => 'mc' }); > > or alternatively: > > push @{ $attr->{join} }, 'mt'; > push @{ $attr->{join} }, 'mc'; > $attr->{prefetch} = 'mc'; > my $rs1 = $c->model('weight::Mdata')->search($where, $attr); > > > HTH > > patrick > > -- > Patrick Meidl, Mag. > Senior Expert Software Engineering > > IST - Institute of Science and Technology Austria > Am Campus 1 > A-3400 Klosterneuburg, Austria > > R 03.EG.003 > T +43 2243 9000 1063 > E pme...@ist.ac.at > W http://www.ist.ac.at/ > > > _______________________________________________ > 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