[Dbix-class] ResultSet columns attribute broken?
Bernhard Graf
dbic3 at augensalat.de
Tue Apr 28 17:20:49 GMT 2009
After upgrading to 0.08100 some of my DBIC code showed error messages
similar to what was discussed in
http://n2.nabble.com/DBIx::Class-0.08100-released-to-CPAN-td2659408.html
The only difference: It happened with search().
It turned out, that the following doesn't work anymore:
(modified from t/76select.t)
my @cds = $schema->resultset('CD')->search({},
{
'join' => 'artist',
'columns' => ['me.cdid','me.title','artist.name'],
}
);
DBIx::Class::ResultSet::search(): Column artist not loaded or not passed
to new() prior to insert() on DBICTest::CD=HASH(0x199d820) trying to
resolve relationship (maybe you forgot to call ->reload_from_storage to
get defaults from the db) at t/76select.t line 13
whereas this works:
my @cds = $schema->resultset('CD')->search({},
{
'join' => 'artist',
'+columns' => ['artist.name'],
}
);
Bernhard Graf
More information about the DBIx-Class
mailing list