From: Marcus Ramberg Date: Mon, 13 Feb 2006 22:13:17 +0000 (+0000) Subject: another fix for group_by as scalar. X-Git-Tag: v0.06000~106 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d0f1e63fe2ca04b775a826afb5f029202745f6e8;p=dbsrgits%2FDBIx-Class.git another fix for group_by as scalar. --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 4ee659e..65282d3 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -401,7 +401,7 @@ sub count { my $pk = shift(@pk); my $alias = $self->{attrs}{alias}; my $re = qr/^($alias\.)?$pk$/; - foreach my $column ( @$group_by ) { + foreach my $column ( @distinct) { if( $column =~ $re ) { @distinct = ( $column ); last;