Top "Entitymanager" questions

The EntityManager is the representation of a PersistenceContext, allowing a user to manipulate data pulled from a database.

Using EntityManager inside Doctrine 2.0 entities

I have 2 entities: Country (id, name) and Mapping (id, object, internalId, externalId). Country and Mapping are not connected with associations (…

entitymanager doctrine-orm
In Doctrine 2 can the Fetch Mode (Eager/Lazy etc.) be changed at runtime?

I have entities which I would like to eagerly load , and on other ocassions lazy (or even extra lazy) load. …

orm doctrine doctrine-orm datamapper entitymanager
When should EntityManagerFactory instance be created/opened?

Ok, I read bunch of articles/examples how to write Entity Manager Factory in singleton. One of them easiest for …

java jpa singleton entitymanager
Is there a way to pass detached object to JPA persist? (detached entity passed to persist)

I have 2 entities : Account and AccountRole. public class Account { private AccountRole accountRole; @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.EAGER) public …

java hibernate jpa entitymanager
createEntityManager throws java.lang.NullPointerException at org.hibernate.engine.transaction.internal.jta.JtaStatusHelper.getStatus

I'm getting this stack trace when I deploy my hibernate app java.lang.NullPointerException at org.hibernate.engine.transaction.internal.…

hibernate jpa nullpointerexception entitymanager
No transactional EntityManager available - working with JPA Api, error with Hibernate Session

I am trying to unwrap the Hibernate Session from injected EntityManager, as I need to use Hibernate's native Criteria API. …

java spring hibernate jpa entitymanager
What is the difference between LocalContainerEntityManagerFactoryBean and LocalEntityManagerFactoryBean?

Can anybody explain what is the difference between the Spring Framework's LocalContainerEntityManagerFactoryBean and LocalEntityManagerFactoryBean?

spring hibernate jpa entitymanager spring-orm
Getting a reference to EntityManager in Java EE applications using CDI

I'm using Java EE 7. I would like to know what is the proper way to inject a JPA EntityManager into …

java jpa cdi entitymanager java-ee-7
When use createQuery() and find() methods of EntityManager?

I would like to know the difference between on these methods. When use the createQuery()and find() methods of EntityManager ? …

java jpa entitymanager
Spring Data JPA: Repositories for multiple database / Entitymanger configurations

I have two Entitymanager bean configurations. Each pointing to a separate database with a different schema (one is Oracle, the …

entitymanager spring-data-jpa multiple-databases