Reduce complexity of EntityRepository#find()