实体类有ABC:
但数据表的列名没有ABC。
xml映射代码如下:
<resultMap type="com.ghy.www.annotation.tablename.resultmap.entity.Userinfo" id="userinfoResultMap">
<result column="id" property="idABC"/>
<result column="username" property="usernameABC"/>
<result column="password" property="passwordABC"/>
<result column="age" property="ageABC"/>
<result column="insertdate" property="insertdateABC"/>
</resultMap>
执行plus自带的selectById方法,出现如下异常: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ghy.www.annotation.tablename.resultmap.sqlmapping.IUserinfoMapping.selectById
select开头的方法。
调试发现,命令列表中根本没有selectById的方法啊,
不知道这是不是BUG。
Comment From: startjava
@miemieYaho
Comment From: startjava
还有其它的selectXXX方法没有加入map。
Comment From: startjava
解决。添加@TableId注解。
调试源代码OK: