Skip to content
New issue

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

no-xml版本,查询其他字段正常,但主键永远是0。请问是哪里出问题了? #40

Open
a1363901216 opened this issue May 11, 2018 · 1 comment

Comments

@a1363901216
Copy link

no-xml版本异常,junit :
BookDaoTest.testQueryAll()---->
Book [bookId=0, name=Java程序设计, number=91]
Book [bookId=0, name=数据结构, number=7]
Book [bookId=0, name=设计模式, number=8]
Book [bookId=0, name=编译原理, number=8]

xml版正常:
BookDaoTest.testQueryAll()---->
Book [bookId=1000, name=Java程序设计, number=90]
Book [bookId=1001, name=数据结构, number=7]
Book [bookId=1002, name=设计模式, number=8]
Book [bookId=1003, name=编译原理, number=8]

@zunpiau
Copy link

zunpiau commented May 12, 2018

已经修复 zunpiau@ad348a5
原因在于 SqlSessionFactoryBean.setConfigurationProperties() 没有生效,没有开启驼峰式转换。可以用 mybaties-spring1.3.0 新增的 API 见http://www.mybatis.org/spring/zh/factorybean.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants