Add where con has_many condition.