About Persistence Context

forum_thread

JBoss 7 startup fails

Hi, I was having a go with entity beans 3.x jboss 7, objectdb and the guestbook web application but cannot come out of the swamp. I use eclipse indigo as IDE The "src" folder contains the pachake guest and within the classes: Guest.java, GuestListener.java and GuestServlet.java The WebContent/META-INF dir contains: context.xml ... The WebContent/META-INF dir contains: context.xml <?xml version = "1.0" encoding = ... = "true" path = "/Guestbook" /> persistence.xml <persistence version = "2.0" xsi:schemaLocation = ...

 
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 ...

 
api-jpa

javax.persistence.FlushModeType

Flush mode setting.(Enum of JPA)

 
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 ...

 
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

Extra uninitialised entities spawned on merge()

In the following, Element is a base entity class, with a bi-directional @ManyToOne-@OneToMany relationship Element owner - List<Element> ownedElements, and Example is a subclass entity with a relationship @OneToOne Element child. ...   import java. util . *; import javax. persistence . *;   public class ... EntityManagerFactory emf = Persistence . createEntityManagerFactory ( ... persist() operation. It adds the entity to the persistence context, but instead of adding the original entity instance, it creates a new ...

 
forum_thread

Schema Update: class hierarchy change

Hello, we try to change the class hierarchy of an Entity. You wrote www.objectdb.com/database/forum/899 that ObjectDB support automatic schema evolution for adding and removing fields and for class hierarchy change.   But our small test failed: At first create a DataBase with one Object of MyEntity ... classhierachychange ;   import javax. persistence . Basic ; import javax. persistence . Entity ... Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell ...

 
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

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 ...