spring - Changes in Oracle database are not visible for a certain query -


i have large query looks this:

select stuff, case when (some subselect) > 0 'value 1'           when (another subselect) > 0 'value 2'           else 'value 3' end status (yet subselect) e  

it works great. then, spring, trough jparepositories make changes effect some subselect part, reason, these changes not immediate. in other queries changes visible, tried using several transnational mechanism in spring, tried not using transaction @ all, i'm using saveandflush on repositories, without luck.

but delay happened if restarted tomcat server before changes visible. delay visible external db manipulation program, i'm guessing problem not application.

can kind of oracle caches or transactions effect this? how can purge, flush, commit them?

edit (for request in comments):

in java make basic changes

java code

myentity myentity = myentitydao.findone(someid); myentity.setproperty(newvalue); myentitydao.saveandflush(myentity); 

where myentitydao looks like

@repository public interface myentitydao extends jparepository<myentity, integer> {      //... other unrelated hql query methods } 

sorry can't post more specific, it's huge, , also, can't, corporate reasons. note, working, delay, between modification , 1 specific query. other queries can see changes immediately.

most probable reasons are:
1) changes made in separate transaction , not committed before query started.
oracle doesn't allow read not committed changes other transactions.
, query returns consistent data moment of query start.
2) if change transaction "read only" or "serializable" oracle return data consistent transaction start. changes made in transaction need committed before read transaction started.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -