Minor optimization
Peter Rabbitson [Thu, 7 Jan 2010 10:22:42 +0000 (10:22 +0000)]
lib/DBIx/Class/ResultSet.pm

index d3d71d1..13df20d 100644 (file)
@@ -1431,7 +1431,7 @@ sub _rs_update_delete {
   my $cond = $rsrc->schema->storage->_strip_cond_qualifiers ($self->{cond});
 
   my $needs_group_by_subq = $self->_has_resolved_attr (qw/collapse group_by -join/);
-  my $needs_subq = (not defined $cond) || $self->_has_resolved_attr(qw/row offset/);
+  my $needs_subq = $needs_group_by_subq || (not defined $cond) || $self->_has_resolved_attr(qw/row offset/);
 
   if ($needs_group_by_subq or $needs_subq) {