We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.4.4 (Tried 3.5.1, get the same result)
MySQL5.7 Innodb
https://gitee.com/yangjiayi/mybatis-issue-test
Create two Mapper.xml that with same namespace interface, such as
Add cache node to IssueMapper.xml, like this
IssueMapper.xml
Step1. invoke select method that implemented in IssueMapper.xml, Hit cache false.
Step2. invoke update method that implemented in IssueMapperExt.xml.
IssueMapperExt.xml
Step3. invoke select method that implemented in IssueMapper.xml again, Hit cache true!
Step3 get the lastest data in database
Step3 get same data with step1, not latest data in database
The text was updated successfully, but these errors were encountered:
I try to add cache node in both xml, but it throw an Exception
Sorry, something went wrong.
Adding <cache-ref /> to IssueMapperExt.xml may fix the problem.
<cache-ref />
<cache-ref namespace="com.zoi7.mybatis.issue.test.mapper.IssueMapper" />
Adding <cache-ref /> to IssueMapperExt.xml may fix the problem. <cache-ref namespace="com.zoi7.mybatis.issue.test.mapper.IssueMapper" />
Amazing! it works, so thanks!
No branches or pull requests
MyBatis version
3.4.4 (Tried 3.5.1, get the same result)
Database vendor and version
MySQL5.7 Innodb
Test case or example project
https://gitee.com/yangjiayi/mybatis-issue-test
Steps to reproduce
Create two Mapper.xml that with same namespace interface, such as
Add cache node to
IssueMapper.xml
, like thisStep1. invoke select method that implemented in
IssueMapper.xml
, Hit cache false.Step2. invoke update method that implemented in
IssueMapperExt.xml
.Step3. invoke select method that implemented in
IssueMapper.xml
again, Hit cache true!Expected result
Step3 get the lastest data in database
Actual result
Step3 get same data with step1, not latest data in database
The text was updated successfully, but these errors were encountered: