Consider model in generic substitution type query