getEntityManager partialy-fixed