Mybatis中的resultType与resultMap

来源:互联网 发布:大数据hadoop项目 编辑:程序博客网 时间:2024/05/09 13:58
(自己的理解)

resultType

 

resultMap

<!--查询作者--><select id="selectAuthor" resultMap="authorResult">    SELECT        id,        username,        nickname,        birthday,        register_time    FROM         author    WHERE          id = #{id}</select><!--作者结果映射--><resultMap id="authorResult" type="Author">    <id property="id" column="id"/>    <result property="registerTime" column="register_time"/></resultMap>           

 

原创粉丝点击