Updated data (in Database) is not visible via JPA/Eclipselink [duplicate]
I have Oracle DB and Java project which is connected to the DB using JPA/Eclipselink.
The problem is that when some data updated in the database (manually using Oracle SQL developer), this data is not visible 开发者_如何转开发via JPA, only old values. What can cause such problems?Please try em.refresh()
JPA's EntityManager will be unaware of any changes you made outside its transaction till it reloads the data. Above command will make it reload the data.
If it is a List (populated using select), then you'll need to reload it.
精彩评论