About find

71-80 of 200Refresh
Forum
2

Should derived fields of an EmbeddedId be manually maintained by app code?

@EmbeddedId, am I responsible for maintaining the derived fields of the @EmbeddedId? I could not find ... the embeddedIds explicitly and the test fails where it attempts to find an item with an @EmbeddedId ... TestException("cannot find ECompoundKeyMapItem 1"); } However it does not fail on Eclipselink. If I alter
Forum
2

Bug: ClassCastException by retrieval

);   System.out.printf("Original : %s %n",tn.getTa());   trans.commit();//*/     tNode tn2 = em.find(tNode.class, 1);   System.out.printf("find instancely : %s %n",tn2.getTa()); System.out.printf("Arrays ... (Arrays.toString(la));   em.clear();     tNode tn3 = em.find(tNode.class, 1);   System.out.printf
Forum
2

em.flush(); em.clear(); loosing data and not persisting managed objects

.flush(); em.clear(); } System.out.println("i="+i); TestEntity t1 = em.find ... the resulting string as my Primary Key. When doing this the em.find() method seems to be fast ... .OBC.aK(OBC.java:929) at com.objectdb.jpa.EMImpl.find(EMImpl.java:542) at com.objectdb.jpa.EMImpl
Forum
2

Error reading UTF string

.Final.jar:7.1.1.Final] at granat.dp.ejb.PersonBeanLocal$$$view177.find(Unknown Source) [DP-domain.jar ... UTF string at granat.dp.ejb.PersonBean.find(PersonBean.java:287) [DP-ejb.jar:] at sun.reflect ... :] at com.objectdb.jpa.EMImpl.find(EMImpl.java:591) [objectdb-jee.jar:] at com.objectdb.jpa.EMImpl
Forum
2

Mapped (Inverse) LAZY @OneToMany vs. Unmapped LAZY @OneToMany

to console a lazy @OneToMany mapped field after a finding entity manager closes. There is a switch DO_VIEW_BEFORE_CLOSE, and when it is true the fields are accessed and output before the finding entity ... ]"b2"] When I set DO_VIEW_BEFORE_CLOSE false, so that the fields are only accessed after the finding
Forum
2

New to Product & Having An Issue

findDepartment(){ Department d = em.find(Department.class, this.departmentId); assertNotNull ... I generated. However, the second test findDepartment fails to find any results and returns NULL ... would be greatly appreciated. Hi, I think that find returns null because different departmentId values
Forum
2

Pre-detach loading: retrieval by navigation not working in if statement

have been unable to find the point of difference. So I will try first just showing selected portions of code ... and why. I am using pre-detach loading after em.find(id), because just relying on JPA-annotations ... -query @EJB with a specific loader that - after the em.find(id) is performed - executes selected
Forum
2

Selective merge/cascade of detatched entity

the entire database) and this is inefficient. Replacing the merge with find solves the problem:     s = em.find(Salesman.class, s.getId());    // em.merge(s); The last output lines in that case ... multiple threads (all using 'synchronized' operations for field access). Could this 'find' method
Forum
2

Unable to persist TreeMap

\\TestProject\\Storage.odb");         em = emf.createEntityManager();         p = em.find(Person ... realized existed. I neglected to check first. Hopefully this additional information will help find the problem in the real application. I'll post what the original problem was when I find it. Your help
Forum
1

Does ObjectDB support lazy loading?

.createEntityManager(); a = em.find(A.class, id); System.out.println(a.list); em ... change the main method as follow, and execute java ... LazyTest persist java ... LazyTest find The find ... ;          System.out.println(id); } else if (args[0].equals("find")) {          A a = em.find(A.class, 1