Merge 'trunk' into 'prefetch'
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSetColumn.pm
index 4017466..ae704f9 100644 (file)
@@ -86,7 +86,7 @@ sub new {
 
   # {collapse} would mean a has_many join was injected, which in turn means
   # we need to group *IF WE CAN* (only if the column in question is unique)
-  if (!$orig_attrs->{group_by} && keys %{$orig_attrs->{collapse}}) {
+  if (!$orig_attrs->{group_by} && $orig_attrs->{collapse}) {
 
     # scan for a constraint that would contain our column only - that'd be proof
     # enough it is unique