title: rails update_all for ActiveRecord Relation using 'having' don't work
body: <p>Sample:</p>
  
  <pre><code>a = Model.join("...").where("...").group("...")
  b = Model.join("...").where("...").group("...").having("...")
  </code></pre>
  
  <p>If I do:</p>
  
  <p><code>a.class</code> gives me ActiveRecord::Relation. Same with <code>b.class</code>.</p>
  
  <p>When I do:</p>
  
  <p><code>a.length</code> i get <strong>1000</strong>. And <code>b.length</code> i get <strong>50</strong></p>
  
  <p>And finally, if i do:</p>
  
  <pre><code>a.update_all(field:'...')
  =&gt; 1000
  
  b.update_all(field:'...')
  =&gt; 1000
  </code></pre>
  
  <p>Not <strong>50</strong>, as I was expecting.</p>
  
  <p>Why this happen? Is there any way to  deal with this?</p>