About EntityManager

101-110 of 200Refresh
Result
8

Posting to ObjectDB Website - Important Instructions [2018-08-06]

");         EntityManager em = emf.createEntityManager();         em.getTransaction().begin();         MyEntity e = new
Manual
8

Updating JPA Entity Objects

entity object from within an active transaction. No EntityManager's method is invoked to report
Tutorial
8

Step 3: Add a Main Class

("$objectdb/db/points.odb"); EntityManager em = emf.createEntityManager(); // Store 1000
Tutorial
8

Step 6: Set the Spring XML

, controllers and transactions), to inject a JPA EntityManager, to manage transactions and to look for JSP
Tutorial
8

Step 3: Add a Main Class [2011-02-11]

= Persistence.createEntityManagerFactory("$objectdb/db/points.odb"); EntityManager em
Tutorial
8

Step 3: Add a Main Class

= Persistence.createEntityManagerFactory("$objectdb/db/points.odb"); EntityManager em
JPA Doc
7

javax.persistence.EntityNotFoundException

EntityManager.getReference is accessed but the entity does not exist. Thrown when EntityManager.refresh is called and the object no longer exists in the database. Thrown when EntityManager.lock is used ... , if one is active, will be marked for rollback. Since: JPA 1.0 See Also: EntityManager.getReference
JPA Doc
6

javax.persistence.EntityManagerFactory

: IllegalStateException - if the entity manager factory has been closed Since: JPA 1.0 EntityManager createEntityManager() Create a new application-managed EntityManager. Create a new application-managed EntityManager. This method returns a new EntityManager instance each time it is invoked. The isOpen
Forum
5

Is it possible to remove parent/child entities without refresh?

We have a big entity object tree in our project. If I use the entityManager.remove(childEntity) method to remove a child entity a entityManager.refresh(parentEntity) is necessary in order to have an updated parent/child object tree in memory. But entityManager.refresh is too slow for our project
JPA Doc
4

javax.persistence.OptimisticLockException

, if one is active, will be marked for rollback. Since: JPA 1.0 See Also: EntityManager.find(Class, Object, LockModeType) EntityManager.find(Class, Object, LockModeType, java.util.Map) EntityManager.lock(Object, LockModeType) EntityManager.lock(Object, LockModeType, java.util.Map