About flush

release

2.2.2

... Fixed a bug in queries on deleted objects before commit / flush. Version 2.2.0 Added full support of JPA 2 ...

 
forum_thread

OrphanRemoval not working?

Dear all, I have entities Invoice and InvoiceItem, their relation is defined: public class Invoice implements Serializable { ..     @OneToMany(mappedBy = "invoice", fetch= FetchType.EAGER, orphanRemoval=true, cascade= CascadeType.ALL)     private List<InvoiceItem> invoiceItemList; .. } ... to null. When saving the entity, I'm using merge and flush. The entity object is managed, so I think this has no effect... ...

 
api-jpa

clear()

Clear the persistence context, causing all managed entities to become detached.(Method of javax.persistence.EntityManager)

 
forum_thread

Query problem after transaction commit

I have a machine running the objectdb server and the client on another machine connect to it. The client program can connect to the server and query to get all the records. However, after transaction.begin ... persist(p) .. commit of a new object, my client program can no longer retrieve the old records but only the latest stored record. I tried to run database explorer on the server machine and able to see all the records including the new stored record.... be a cache issue with a simple solution (e.g. changing flush mode from commit to auto could solve it). However, a situation in which ...

 
forum_thread

SectionClassifier message in log

I'm trying to track down an issue in an application - the problem occurs around the retrieval of an object from a database the specifics are unclear at the moment. In the objectdb log the following message is written everytime the issue occurs. Could you give more detail about what this message means? [2011-11-24 20:43:10 #114098 store] SectionClassifier: SectionClassifier{'4548f06f-405e-4f3e-9b7b-8e27bf4bd91c'->merger[3477129]-missing:1713} ... rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.flush(Unknown Source) at rbccm.felix.objectdb.messaging.ObjectDbMessagePipe.flush(Unknown Source) ... 42 more Caused by: ...

 
forum_thread

Newbie : How to return the auto-generated ID

Hello, I am new to this community, as well as JPA and ObjectDB. I want to read the auto-generated ID when I persist a new entity (with @Id @GeneratedValue annotations applied). I am following the following link : http://www.objectdb.com/tutorial/jpa/eclipse/web/entity Thanks. ... allocated value is available only after commit or flush and not after persist . If you need to have the id available ...

 
issue

[ObjectDB 2.6.7_04] Unexpected exception (Error 990)

Since Version 2.6.7_04 we get the following NullPointerException at Query execution: ... trace indicates an unexpected condition at the end of a flush operation (before executing a query). It doesn't seem related ...

 
forum_thread

Attempt to remove a detached entity object (error 613)

Hello, that a strange error for me ... I have a detached object in my Java code and i just wanted to merge it ... Unfortunatly, i get this error : Failed to commit transaction: Attempt to remove a detached entity object (error 613)      at com.objectdb.jpa.EMImpl.commit(EMImpl.java:290) We see in this stack trace that is a commit operation, all right ... So why does it try to remove the object ... ? #1 2013-10-11 08:22 Hello, that's a strange error for me ... I have a detached object in my Java code and i just wanted t ...

 
forum_thread

Query for objects persisted within the same transaction

I have a question concerning reading uncommited entities with query, within active transaction. For example, I read data from file. Each line contains value of one of entity's attributes but those values are not unique, so it's possible to have a multiple instances of the same entity. To eliminate duplicates, after reading every line I first check using a query, if an entity with that attribute value already exists. If no - I create one and persist it.... You may change the default flush mode: http://www.objectdb.com/java/jpa/query/setting#Flush_Mode_setFlushMode ObjectDB Support ...

 
api-jpa

javax.persistence.OptimisticLockException

Thrown by the persistence provider when an optimistic locking conflict occurs.(Exception of JPA)