About Persistence Context

forum_thread

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

We have a big object tree in our project. If I use the entityManage.remove method a entityManager.refresh is necessary in order to have an updated object tree in memory. But entityManager.refresh is too slow for our project. Do you know a possibilty to remove parent/child entities without entityManager.refresh after the entityManager.remove operation? I have searched for a solution with the following unit test (See testRemoveVariant2()). But my approach works correctly. Do you have an idea? ... does not work correctly ([ObjectDB 2.5.7_02] javax.persistence.RollbackException Failed to commit transaction: (error 613)). Do ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Error 613 - i cant put a list<Athlete> into a Squad object

hey guys Im a swiss student and my english is not that good and ive never posted in your forum, so thats why im sorry if im doing any mistakes, but i have big trouble, because ive to get this straight till end of week. i uploaded also all classes but if u see the problem in the main problem field the classes are copied after the problem description. the structure: ... Exception in thread "main" [ObjectDB 2.2.0] javax.persistence.RollbackException Failed to commit transaction: Failed to write the ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
api-jpa

javax.persistence.FlushModeType

Flush mode setting.(Enum of JPA)

 
forum_thread

Possible issue with timestamps

Hi, If I query doing something like: select c from CDI c where c.creationDate > {ts '2012-03-29 11:00:00} and c.creationDate < {ts '2012-03-29 12:00:00'} the test fails. Its ONLY for 12:00:00. When I started digging I found that if I queried 00:00:00 to 00:25:00 and then did 12:00:00 to 12:25:00 I got IDENTICAL results. For some reason 12:00:00 is being treated the same as 00:00:00. All other hours seem to be fine. ... javax. jdo . annotations . *; import javax. persistence . *;   import org. junit . *;     ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
issue

Issues with JDO Casting & Full Qualified Names

hi! See this query and the comments about failures. This is really urgent for us because as you've stated, this is the only workaround for now to proper casting AND map KEY access though it isn't working correctly either.. ... java. util . Map ;   import javax. persistence . Embeddable ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
issue

Remove of an entry from a @OneToMany collection is not possible if the enhancer is disabled

Hello! When the JPA entities are not enhanced the remove of an entry from a @OneToMany collection is not possible. The following java code demonstrates the problem. The statement parentEntity.getChildEntityContainer().remove("01"); does not work with not enhanced JPA entities. ... java. util . Map ;   import javax. persistence . CascadeType ; import javax. persistence . ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
forum_thread

Caching/Paging Questions...

Greetings ObjectDB team, All below questions assume a very large database (~1,000,000,000 objects): Q1: Two queries with a big overlap between their result sets. If I query the first set and hold the results in memory somehow, would that speed up the execution of the second query since many of its result objects already created and reside in memory ?... maximum memory size of ObjectDB L2 cache or EntityManager context ? Q4: Would paging result sets via setFirstResult and ... execution is not affected directly by the content of the persistence context (the EntityManager L1 cache) but instantiation of the ...

 
issue

new objects not available in mappedBy associations

Given a mappedBy association: e.g: @OneToMany(mappedBy="department") public List <Employee> employees;   creating a new mapped class, e.g. new Employee, won't result in this object being available in the same transaction: ie: for (Employee e : department.employee) won't include the new object, even if it is persisted, and even if the transaction is committed??  ... refresh an object? http://www.objectdb.com/java/jpa/persistence/retrieve#Retrieval_by_Refresh > If the mappedby tag maps ... again from the database (and not from the persistence context cache), or refresh is invoked. ObjectDB ...

 
forum_thread

Storing objects problem

I want to save this object to database: @Entity public class Device { private String name; private String type; private String ipAddress; private Device parent; @Id private String ID; private String ID_HZMO; @ElementCollection private List<Device> children; }    ... EntityManagerFactory emf = Persistence . createEntityManagerFactory ( ... import java. util . *; import javax. persistence . *;   public class Test { public ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
api-jdo

javax.jdo.InstanceCallbacks

A PersistenceCapable class that provides callback methods for life cycle events implements this interface.(Interface of JDO)