Support for where queries on a belongs_to association