Partial backref and relationship with custom query class.