title: Rails STI and multi-level inheritance queries
body: <p>In my database I have a table <code>people</code>, and I'm using single table inheritance, with these classes:</p>
  
  <pre><code>class Person &lt; ActiveRecord::Base
  end
  
  class Member &lt; Person
  end
  
  class Business &lt; Member
  end
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/Ek6up.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ek6up.png" alt="Demonstration of the problem"></a></p>
  
  <p>The queries it generates confuse me.  What I want is for <code>Member.all</code> to return all Businesses as well as any other subtypes of Member. Which it does, but only if I've accessed the Business class recently. I assume it's because my classes aren't being cached in development mode (for obvious reasons), but it still seems like strange/buggy behaviour.</p>
  
  <p>Is this a bug in rails? Or is it working as intended? In either case, can anyone think of a good fix for development purposes?</p>