About refresh

manual

Retrieving JPA Entity Objects

Explains how to use JPA to retrieve entity objects from the database.... Retrieval by Query Retrieval by Refresh Cascading Refresh Retrieval by Class and Primary Key Every ...

 
api-jdo

refresh(pc)

Refresh the state of the instance from the data store.(Method of javax.jdo.PersistenceManager)

 
forum_thread

EntityManager.refresh takes a long time

EntityManager.refresh takes a long time for entity object Person in this code: ... 15:21 EntityManager.refresh takes a long time for entity object Person in this code: ... logger. log ( Level. INFO , "begin refresh for person = " + person + " " + new ...

 
api-jpa

refresh(entity, lockMode)

Refresh the state of the instance from the database, overwriting changes made to the entity, if any, and lock it with respect to given lock mode type.(Method of javax.persistence.EntityManager)

 
manual

Locking in JPA

Explains how to use optimistic locking and pessimistic locking in JPA.... methods that take locks (lock, find, or refresh) or to the Query.setLockMode() or TypedQuery.setLockMode() method. ... methods that take locks (lock, find, or refresh) or to the Query.setLockMode() or TypedQuery.setLockMode() method. ... methods that take locks (lock, find, or refresh) or to the Query.setLockMode() or TypedQuery.setLockMode() method. ...

 
api-jpa

refresh(entity)

Refresh the state of the instance from the database, overwriting changes made to the entity, if any.(Method of javax.persistence.EntityManager)

 
api-jpa

CascadeType.REFRESH

Cascade refresh operation(Enum Constant of javax.persistence.CascadeType)

 
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? ... method to remove a child entity a entityManager.refresh(parentEntity) is necessary in order to have an updated parent/child object tree in memory. But entityManager.refresh is too slow for our project. Do you know a way to remove a child entity ...

 
forum_thread

EntityManager refresh problem

Dear Support, in the following code you can see a EntityManager.refresh() example. The example throws an assertion error with the following statement: Assert.assertEquals("entity 1", simpleEntity1.getFieldA()); In my opinion there should be no assertion error. I have tested the example with several objectdb versions (2.5.4, 2.5.6_06 and 2.5.7). Do you have an explanation for the assertion error? ... following code you can see an example with EntityManager.refresh(). The example throws an assertion error (The Assert statement is ... "entity 1b" ) ; entityManager. refresh ( simpleEntity1 ) ; Assert. assertEquals ...

 
api-jpa

CacheStoreMode.REFRESH

Insert/update entity data into cache when read from database and when committed into database.(Enum Constant of javax.persistence.CacheStoreMode)