update entity manager