columnPropertyUnsame

Posted csslcww

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了columnPropertyUnsame相关的知识,希望对你有一定的参考价值。

<mapper namespace="com.abc.dao.IStudentDao">
    <insert id="insertStudent">
        insert into student(tname,tage,score) values(#{name}, #{age}, #{score})
    </insert>
    
    <delete id="deleteById">
        delete from student where tid=#{xxx}
    </delete>
    
    <update id="updateStudent">
        update student set tname=#{name}, tage=#{age}, score=#{score} where tid=#{id}
    </update>
    
    <select id="selectStudentById" resultType="Student">
        <!-- 给与属性名称不同的字段别名,让别名与属性名称相同 -->
        select tid id,tname name,tage age,score from student where tid=#{ooo}
    </select>
    
</mapper>

 

<mapper namespace="com.abc.dao.IStudentDao">
    <insert id="insertStudent">
        insert into student(tname,tage,score) values(#{name}, #{age}, #{score})
    </insert>
    
    <delete id="deleteById">
        delete from student where tid=#{xxx}
    </delete>
    
    <update id="updateStudent">
        update student set tname=#{name}, tage=#{age}, score=#{score} where tid=#{id}
    </update>
    
    <resultMap type="Student" id="studentMap">
        <id column="tid" property="id"/>
        <result column="tname" property="name"/>
        <result column="tage" property="age"/>
    </resultMap>
    
    <select id="selectStudentById" resultMap="studentMap">
        select tid,tname,tage,score from student where tid=#{ooo}
    </select>
    
</mapper>

 

以上是关于columnPropertyUnsame的主要内容,如果未能解决你的问题,请参考以下文章

VSCode自定义代码片段——CSS选择器

谷歌浏览器调试jsp 引入代码片段,如何调试代码片段中的js

片段和活动之间的核心区别是啥?哪些代码可以写成片段?

VSCode自定义代码片段——.vue文件的模板

VSCode自定义代码片段6——CSS选择器

VSCode自定义代码片段——声明函数