Change the third argument in :has-a & :has-many options. Now it is a select-statement, not a where-clause.