Subject: | group_by as a scalar ref fails |
calling $rs->first on this no longer works. It worked OK in 0.08107.
The problem is the group_by => \"SUBSTR(me.namesort, 1, 1)" where the
code now expects group_by to always be an array ref.
do {
my $a = bless({
_result_class => "Slim::Schema::PageBar",
_source_handle => bless({ schema => "Slim::Schema", source_moniker
=> "Contributor" }, "DBIx::Class::ResultSourceHandle"),
attrs => {
alias => "me",
as => ["letter", "count"],
group_by => \"SUBSTR(me.namesort, 1, 1)",
"join" => ["contributorAlbums"],
order_by => "me.namesort",
result_class => "Slim::Schema::PageBar",
"select" => [\"SUBSTR(me.namesort, 1, 1)", { count =>
\"DISTINCT(me.id)" }],
where => { "contributorAlbums.role" => { in => [1, 5] } },
},
cond => 'fix',
count => undef,
pager => undef,
}, "Slim::Schema::ResultSet::Contributor");
$a->{cond} = $a->{attrs}{where};
$a;
}
[09-07-10 14:33:03.6742] Slim::Schema::Storage::throw_exception (87)
Error: Not an ARRAY reference at
/Users/andy/dev/Slim/7.4/branches/noweb-sqlite/server/CPAN/DBIx/Class/Storage/DBI.pm
line 1429.
[09-07-10 14:33:03.6748] Slim::Schema::Storage::throw_exception (87)
Backtrace:
frame 0: Slim::Utils::Log::logBacktrace
(/Users/andy/dev/Slim/7.4/branches/noweb-sqlite/server/Slim/Schema/Storage.pm
line 87)
frame 1: Slim::Schema::Storage::throw_exception
(/Users/andy/dev/Slim/7.4/branches/noweb-sqlite/server/CPAN/DBIx/Class/Storage/DBI.pm
line 545)
frame 2: DBIx::Class::Storage::DBI::dbh_do
(/Users/andy/dev/Slim/7.4/branches/noweb-sqlite/server/CPAN/DBIx/Class/Storage/DBI/Cursor.pm
line 101)
frame 3: DBIx::Class::Storage::DBI::Cursor::next
(/Users/andy/dev/Slim/7.4/branches/noweb-sqlite/server/CPAN/DBIx/Class/ResultSet.pm
line 949)
frame 4: DBIx::Class::ResultSet::next
(/Users/andy/dev/Slim/7.4/branches/noweb-sqlite/server/CPAN/DBIx/Class/ResultSet.pm
line 1479)
frame 5: DBIx::Class::ResultSet::first
(/Users/andy/dev/Slim/7.4/branches/noweb-sqlite/server/Slim/Web/Pages/Common.pm
line 386)