title: Searching for a entity based on association constraint
body: <p>I have a model (say User), which has <strong>many</strong> logins.</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
      has_many :logins
  end
  
  class Login &lt; ActiveRecord::Base
      belongs_to :user
  end
  </code></pre>
  
  <p>Would it be possible to find users which have a particular login (say with provider == facebook.)</p>
  
  <p>I know it could be done using:</p>
  
  <pre><code>User.joins{logins}.where{logins.provider == "facebook"}
  </code></pre>
  
  <p>But the resultant <strong>user</strong> entity objects are readonly... I know I can make it writable by calling <strong>readonly(true)</strong> on the resultant of where{} but somehow that feels wrong.</p>
  
  <p>Is there no way of doing this without the explicit <strong>logins</strong>?</p>
  
  <p>(using squeel syntax there)</p>