mybatis / mybatis-3

MyBatis SQL mapper framework for Java
http://mybatis.github.io/mybatis-3/
Apache License 2.0
19.85k stars 12.87k forks source link

TransactionalCache Delay to send #1032

Closed meteorice closed 7 years ago

meteorice commented 7 years ago

MyBatis version

3.2.8 - > 3.4.5-SNAPSHOT

Database vendor and version

oracle ,mysql ... any

problem description

I got a data from db , mybatis put it to TransactionalCache ; then edit it in dao. example: idcard value "1234567890" change to "1234**" when i commit Transaction, but 1234** to the redis.

so,can i control TransactionalCache myselft.put data to the redis immediately.

image

Expected result

"1234567890"

Actual result

"1234**"

harawata commented 7 years ago

You need to commit the session (or close if only SELECTs are executed) before editing the data.

Please post your next question to the mailing list. We use GitHub Issues for bug reports and feature requests only. Thank you!

meteorice commented 7 years ago

thanks!