#1159 - multiple entity managers per repository factory should be supported

Supersedes #1159