数据库主键不是默认的id,编辑查看报错,saber如何配置非id命名的主键

Saber 已结 1 1637
大坤
大坤 剑圣 2019-04-24 15:16

会报这个错:

Caused by: org.apache.ibatis.exceptions.TooManyResultsException:
Expected one result (or null) to be returned by selectOne(), but found: 2


1条回答
  •  smallchill
    smallchill (最佳回答者)
    2019-04-24 15:35

    非id主键名需要配置idKey属性

    image.png


    0 讨论(1)
提交回复