解决There is no READABLE property named 'SID'问题
<insert id="insertStudent" parameterClass="Student">
INSERT INTO STUDENT(SID, SNAME, MAJOR, BIRTH, SCORE)
VALUES (#sid#,#sname#,#major#,#birth#,#score#)
</insert>
上面大写的是数据库中表的字段名称
下面的小写的sid是Student类中的属性名称,要注意大小写
本文针对在使用MyBatis框架过程中遇到的ThereisnoREADABLEpropertynamed'SID'错误进行了解析,并提供了一段具体的XML配置代码示例。该问题通常出现在映射文件中的属性名与实体类属性名不匹配的情况下。
16万+

被折叠的 条评论
为什么被折叠?



