Implemented multiple entity manager support with Doctrine injection.