mybatis-mapper / mapper

MyBatis Mapper
https://mapper.mybatis.io
Apache License 2.0
325 stars 47 forks source link

在设置@Entity.Column( id = true)的情况下,依然出现找不到id情况 #62

Closed zhujiang0007 closed 1 year ago

zhujiang0007 commented 1 year ago

image image 在设置了id = true属性的情况下,还是出现了 No setter found for the keyProperty 'id' in 'com.yunjihuitong.upms.model.SysUser'.

zhujiang0007 commented 1 year ago

image 去掉insertable = false也不行

abel533 commented 1 year ago

是 Mapper 接口中 insert 方法注解中指定的 id 名导致的。。你需要在 @Options 中指定为 userId

目前如果id都不一样,就需要在 SysUserMapper 中覆盖基类中的接口定义。

zhujiang0007 commented 1 year ago

谢谢~