TK mybatis SelectByPrimaryKey异常
今天在使用TK mybatis 插件时出现了一个奇怪的现象,当我调用selectByPrimaryKey(7)时,mybatis的sql日志打印为如下所示
===> Preparing SELECT id,a, b, c FROM test WEHER id =? and a = ? and b = ? and c=?
===> Parameters: 7(Long),7(Long),7(Long),7(Long),7(Long)
然后我百度查了相似问题,
发现是PO类里没有给主键添加注解导致的
添加完后的sql打印为:
===> Preparing SELECT id,a, b, c FROM test WEHER id =?
===> Parameters: 7(Long)
相关推荐
xiuyangsong 2020-11-16
Nishinoshou 2020-11-09
jimgreatly 2020-09-01
dongxurr 2020-08-18
Dullonjiang 2020-08-15
Dullonjiang 2020-08-11
Dullonjiang 2020-08-09
dongxurr 2020-08-08
yunzhonmghe 2020-08-07
jimgreatly 2020-08-03
Dullonjiang 2020-07-30
jimgreatly 2020-07-27
liqiancao 2020-07-26
xiuyangsong 2020-07-26
dongxurr 2020-07-26
mcvsyy 2020-07-26
helloxusir 2020-07-25
牧场SZShepherd 2020-07-20