Added support for multiple entity managers