mybatis
爱编程的小胖虎
白痴程序员的成长之路
展开
-
mybitis控制台实体类取值为nulll
1.实体类的属性和数据库里面的字段名不一致导致的。例如:select studentid as id from student order by ${value}(我实体类属性是id,数据库里的字段名是studentid)2.用resultMap绑定 select studentid from student order by ${value}</select>...原创 2019-07-16 16:34:13 · 136 阅读 · 0 评论 -
mybatis 之数据库 include refid ="base_column_list"
先贴上代码: <sql id="Base_Column_List" > id, name, code, stock, purchase_time, is_active, create_time, update_time </sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" ...原创 2019-09-09 15:12:13 · 4060 阅读 · 0 评论