1.实体类的属性和数据库里面的字段名不一致导致的。
例如:
select studentid as id from student order by ${value}(我实体类属性是id,数据库里的字段名是studentid)
2.用resultMap绑定
select studentid from student order by ${value}
</select>
本文讨论了实体类属性与数据库字段名不一致引起的问题,并提供了使用resultMap进行绑定的方法来解决这一问题。
1.实体类的属性和数据库里面的字段名不一致导致的。
例如:
select studentid as id from student order by ${value}(我实体类属性是id,数据库里的字段名是studentid)
2.用resultMap绑定
select studentid from student order by ${value}
</select>
688
1007
1万+

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