It’s not a cache at all, neither a database nor mybatis.
The database is easy to understand. The data you have not committed can only be found in your current transaction, and cannot be found by other clients. If it is found, wouldn't it be dirty reading?
The cache of mybatis is very simple. By default, insert, delete, and update will clear the cache. Only when selecting, will things be placed in the cache.
So the answer is obvious, it’s the problem of turning off auto commit and not committing the update operation to the database, so you can only check it on your own, but you can’t find it if you open a client
It’s not a cache at all, neither a database nor mybatis.
The database is easy to understand. The data you have not committed can only be found in your current transaction, and cannot be found by other clients. If it is found, wouldn't it be dirty reading?
The cache of mybatis is very simple. By default, insert, delete, and update will clear the cache. Only when selecting, will things be placed in the cache.
So the answer is obvious, it’s the problem of turning off auto commit and not committing the update operation to the database, so you can only check it on your own, but you can’t find it if you open a client
Your picture:

Could it be the reason for your affairs? Because you query it immediately after inserting it, but the transaction has not been submitted yet?
The program may use a caching mechanism. The data you inserted may be in the cache and not yet in the database. Search the database cache on Baidu
I think it’s because there’s no commit in
It can only mean that the transaction was not submitted
Proper business issues. Brother, you can see it after the transaction is submitted.