About EntityManager

51-60 of 200Refresh
Manual
23

CRUD Database Operations with JPA [2011-02-11]

Given an EntityManager, em, that represents a JPA connection to the object database, we can use ... an ordinary Java object. It then becomes associated with an EntityManager and with its transaction (as ... can become productive very quickly. The EntityManager object serves as the factory for Query instances
Manual
23

CRUD Database Operations with JPA

Given an EntityManager, em, that represents a JPA connection to the object database, we can use ... an ordinary Java object. It then becomes associated with an EntityManager and with its transaction (as ... can become productive very quickly. The EntityManager object serves as the factory for Query instances
Manual
22

Retrieving JPA Entity Objects

. Given an EntityManager em, the following code fragment demonstrates retrieval of an Employee object ... if the specified class is not an entity class. If the EntityManager already manages the specified entity ... except that if the entity object is not already managed by the EntityManager a hollow object
Manual
19

DELETE Queries in JPA/JPQL

the entity objects into an EntityManager. Removing these objects from the EntityManager within an active ... them, but it should be used cautiously because bypassing the EntityManager may break its synchronization with the database. For example, the EntityManager may not be aware that a cached entity object in its persistence
Manual
17

UPDATE SET Queries in JPA/JPQL

objects into an EntityManager. Updating the relevant entity object fields within an active transaction ... them, but it should be used cautiously because bypassing the EntityManager may break its synchronization with the database. For example, the EntityManager may not be aware that a cached entity object in
Manual
17

Locking in JPA

another EntityManager) since it was retrieved by the current updater. Optimistic locking ... another EntityManager instance) currently holds a PESSIMISTIC_WRITE lock on that database object. A PESSIMISTIC ... .lock(e1, lockMode1); em2.lock(e2, lockMode2); em1 and em2 are two EntityManager instances
Manual
17

UPDATE SET Queries in JPA/JPQL [2011-11-22]

objects into an EntityManager. Updating the relevant entity object fields within an active transaction ... them, but it should be used cautiously because bypassing the EntityManager may break its synchronization with the database. For example, the EntityManager may not be aware that a cached entity object in
Forum
17

EntityManager refresh problem

Hi, in the following code you can see an example with EntityManager.refresh(). The example throws ... -------------------- package example; import java.io.File; import javax.persistence.EntityManager ... void refreshTest() {         EntityManager entityManager = null;         try
Forum
17

UserException - Object User#2 belongs to another EntityManager

EntityManager with the same unitName. TradesC method needs an User, which is taken from UserDataB ... .pingushare.entity.p1.User#2' belongs to another EntityManager at com.objectdb.o.MSG.d(MSG.java:61 ... this should be a problem if, in the same transaction, an entity is passed into more EntityManagers, but here are 2
Forum
16

Attempt to execute a query using a closed EntityManager

. com.objectdb.o.UserException - Attempt to execute a query using a closed EntityManager at com ... to execute a query using a closed EntityManager at org.apache.myfaces.view.facelets.el ... EntityManager at org.apache.el.parser.AstValue.invoke(AstValue.java:291) at org.apache.el