X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSetColumn.pm;h=3756dbf4ad102c0f4590ea694f7e4c1c6920fde8;hb=4f90e9f81ee3fc1ed1a145c15a1676674c0c54b2;hp=1e2a0ebab79e47344c67f5945d56c315f867ff62;hpb=722274d02c729c50a01db38b0d62042fbc48b5e7;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/ResultSetColumn.pm b/lib/DBIx/Class/ResultSetColumn.pm index 1e2a0eb..3756dbf 100644 --- a/lib/DBIx/Class/ResultSetColumn.pm +++ b/lib/DBIx/Class/ResultSetColumn.pm @@ -487,14 +487,14 @@ sub _resultset { unless( $cols{$select} ) { carp_unique( 'Use of distinct => 1 while selecting anything other than a column ' - . 'declared on the primary ResultSource is deprecated - please supply ' - . 'an explicit group_by instead' + . 'declared on the primary ResultSource is deprecated (you selected ' + . "'$self->{_as}') - please supply an explicit group_by instead" ); # collapse the selector to a literal so that it survives the distinct parse # if it turns out to be an aggregate - at least the user will get a proper exception # instead of silent drop of the group_by altogether - $select = \ $rsrc->storage->sql_maker->_recurse_fields($select); + $select = \[ $rsrc->storage->sql_maker->_recurse_fields($select) ]; } }