About EntityManager

191-200 of 200Refresh
Forum
1

Does ObjectDB support lazy loading?

. However, when the Parent object is read from EntityManager, all the properties except ID of the Child objects are null. The EntityManager is not yet closed when the getters are called. After I change the annotation ... = Persistence.createEntityManagerFactory(path); EntityManager em = emf.createEntityManager
Forum
1

Entity factory

, you can obtain the EntityManager in a JPA listener method by using JDO:     EntityManager em = // find the EntityManager that manages this             (EntityManager)JDOHelper
Forum
1

Entity has be persistended,but query not fetched?

.odb");         EntityManager em = emf.createEntityManager();         em.getTransaction().begin ... {} } Maybe you are using a different EntityManager for the query? Updates can only be visible before commit in the EntityManager that was used to apply the updates. Thanks! I are using a different EntityManager for the query. maozf
Forum
1

EntityManagerFactory Fails To Swtich Over To Slave When Master Is Unavailable

; public static void main(String[] args) {   EntityManagerFactory emf = null;   EntityManager em = null ... ();   } finally {    emf.close();   } } private static void queryDatabase(EntityManager em ... ) {   EntityManagerFactory emf = null;   EntityManager em = null;   try {    emf = Persistence
Forum
1

Field not persisted in abstract class with two level of nesting

.Entity; import javax.persistence.EntityManager; import javax.persistence.Persistence; @Entity ... main(String[] args){         EntityManager em = Persistence.createEntityManagerFactory("$objectdb/db ... .EntityManager; import javax.persistence.Persistence; @Entity public class MHD2 implements Serializable
Forum
1

find() delay

a transaction of em. Maybe different EntityManager instances are used and the L2 cache is enabled. L2 ... .createEntityManagerFactory(             "$objectdb/db/test.odb");         EntityManager em = emf.createEntityManager ... ");   EntityManager em = emf.createEntityManager();   EntityTransaction trans = em.getTransaction();   int
Forum
1

Finding out the JPA provider

Do you have any preferred way of finding out whether ObjectDb is my EntityManager's JPA Provider? I ... of the PeristenceUnit were visible in one of the Properties sets returned by the EntityManager and EntityManagerFactory, but its not. So I am left with EntityManager.getDelegate() instanceof com.objectdb.jdo
Issue
1

Issues with JDO Casting & Full Qualified Names

.persistence.Embeddable; import javax.persistence.Entity; import javax.persistence.EntityManager ... .createEntityManagerFactory("objectdb:$objectdb/db/test4.tmp;drop");   EntityManager em = emf ... .persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence
Forum
1

Multi-thread access to single EM's entities

; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax ... .createEntityManagerFactory(             "objectdb:/home/kevin/threads-test.odb");         EntityManager em = emf ... in ObjectDB's EntityManager and associated classes are synchronized, so even if you do use the same
Forum
1

multiple LEFT JOINs do not work as expected

(                 "objectdb:test.tmp;drop");         EntityManager em = emf.createEntityManager ... ();     }         private static Node persistTree(EntityManager em, Node parent, int depth) {         Node node ... .createEntityManagerFactory( "objectdb:test.tmp;drop"); EntityManager em = emf