About flush

forum_thread

Remove not working

Hello! We have a strange problem. ... in the same transaction. No exception is thrown if em.flush() is invoked before em.remove(a); Is it possible that you have a ... deleted. The fix was to do a PersistenceManager.flush() before trying to gather the Extent the second time. I did not ...

 
release

2.2.1

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

 
forum_thread

Problem with @Basic(fetch = FetchType.LAZY)

I have a class where two fields are annotated with @Basic(fetch = FetchType.LAZY) due to them containing quite long Strings and me loading ALL entities of the database on application startup (swing app) This class should hopefully demonstrate the problem: ... ) . commit ( ) ; em. flush ( ) ; em. close ( ) ; ...

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

 
api-jpa

javax.persistence.OrderColumn

Specifies a column that is used to maintain the persistent order of a list.(Annotation of JPA)

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

 
api-jpa

javax.persistence.PessimisticLockException

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

 
forum_thread

On initialisation of lists: impact on migration from EclipseLink to ObjectDB

I would like to draw the attention of those assessing migration from EclipseLink ORM to ObjectDB to a significant difference in the initialization of persistent lists, namely that EclipseLink injects a List implementation into the List field to be initialise it during EntityManager.persist(). So in EclipseLink the following works: public class HasListOfBlocks { .. ... ; em. persist ( h ) ; em. flush ( h ) ; //optional Block childBlock = new ...

 
forum_thread

Need help to make this test work and define proper annotations for entities Lists

Hi, I can't get this simple test case to work, i know it is probably due to the lack of proper annotations on entities list, could anyone help me to define them? NB in this test case I didn't set all entities methods for the sake of clarity, also in actual application no field are public nor static and no entity is static.    ... ) . commit ( ) ; em. flush ( ) ; em. close ( ) ; ...