d.o #2281491, Now using injected entityManager