Added EntityManager support