java - spring-hibernate transaction- changes not reflecting? -


i using spring , hibernate. have method annotated @transactional. method has 2 database calls. 1 call update data in table , other call retrieve data same table based on first call's updated data. problem first call's database change not reflected immediately. change reflected after flow comes out of method annotated @transactional. still tried calling session.flush() no use. please suggest me.

@transactional public void method1(){ dao.updatem1(); dao.getdata(); } 

in knowledge after completion of transaction method changes reflect in database.

but here calling before completion of method.so not getting updated result.


Comments

Popular posts from this blog

Java sticky instances of class com.mysql.jdbc.Field aggregating -