    # File lib/active_record/base.rb, line 2264
            def expand_hash_conditions_for_aggregates(attrs)
              expanded_attrs = {}
              attrs.each do |attr, value|
                unless (aggregation = reflect_on_aggregation(attr.to_sym)).nil?
                  mapping = aggregate_mapping(aggregation)
                  mapping.each do |field_attr, aggregate_attr|
                    if mapping.size == 1 && !value.respond_to?(aggregate_attr)
                      expanded_attrs[field_attr] = value
                    else
                      expanded_attrs[field_attr] = value.send(aggregate_attr)
                    end
                  end
                else
                  expanded_attrs[attr] = value
                end
              end
              expanded_attrs
            end