use custom entity manager in commands