About EntityManager

141-150 of 200Refresh
Forum
2

Filename.odb$ Persisting Issue

- Copy0.odb"); public  static EntityManager departmentDB = emf.createEntityManager(); public  static EntityManager employeeDB = emf.createEntityManager(); public  static EntityManager paygradeDB = emf.createEntityManager(); public  static EntityManager programDB = emf.createEntityManager
Issue
2

InternalException

around the problem. In the error version I'm keeping the entityManager at the thread level. It is created the first ... entityManager is opened & closed for each action (load, remove, etc). When an update has occurred the actions are now: Open a new EntityManager Open a new transaction Merge the updated object (entityManager
Forum
2

Mismatch client-server protocol prefix

EntityManager) by two concurrent threads. ObjectDB synchronizes use of EntityManager by different ... in the new implementation. Maybe a socket from a closed EntityManager is still used after the EntityManager is closed after its resources are allocated and used by a new EntityManager. You may try
Issue
2

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

TestQuery {     @PersistenceContext     private EntityManager em;     public ListEntityManager (the default as explained ... findElements, etc. 2. Switch to extended scope EntityManager By doing that you prevent detachment on exit
Forum
2

openejb jpa jaas module

javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax ... EntityManager entityManager; protected Map sharedState = new HashMap ... ) options.get("url")); entityManager = entityManagerFactory.createEntityManager
Forum
2

Visibility of changes in Transaction is not visible to a JPA QL Query

getInstance(EntityManager em) {   Singleton c = em.find(Singleton.class, "1");   if (c == null ... java.lang.Integer lastInstance; public void generateItems(EntityManager em, int howMany ... howManyItemsExist(EntityManager em) {   TypedQuery q = em.createQuery("SELECT COUNT(x) FROM Item x", Long
Forum
2

Problem on JPA Merge Entity.

Hello, I have a problem with the EntityManager.merge() function. I set a property value ... ErgoDaoJpa implements IErgoDao { @PersistenceContext private EntityManager entityManager ... , DaoException { entityManager.persist(ergoClass); } public void updateErgoClass
Forum
2

Query results are not up to date for entities, not primitives

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 ... EntityManager for UPDATE queries." Ok. The question of Bypass does not any diferrence. I am using some
Issue
1

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

Account(); entityManager.persist(account); entityManager.flush(); Project project = new Project(); project.setAccount(account); entityManager.persist(project); entityManager.flush(); account = entityManager.find(account); assertNonNull(account.getProjects());   Expected Result
Forum
1

Duplicate Entity class names causes Exception in Query

static Singleton getInstance(EntityManager em) { Singleton c = em.find(Singleton.class, "1 ... ; @Basic protected java.lang.Integer lastInstance; public void generateItems(EntityManager em, int ... Item findItem(EntityManager em, int which) { TypedQuery q = em.createNamedQuery("objdbTest