MyBatis What to do when the tables in the database are underlined

Source: Internet
Author: User

Add the following snippet of code to the XML

<resultmap id= "Baseresultmap" type= "Your PO class" >

This section is the table data field to write yourself
 <id column= "id" property= "id" jdbctype= "INTEGER"/>
<result column= "username" property= "username" jdbctype= "VARCHAR"/>
<result column= "pwd" property= "pwd" jdbctype= "VARCHAR"/>
<result column= "right_id" property= "Rightid" jdbctype= "INTEGER"/>

</resultMap>

The types returned below are the red characters you defined above <resultmap id= "baseresultmap" type= "Your PO class" >

<select id= "finduserlist" parametertype= "Com.cn.imax.po.UserQueryVo"
resultmap= "Baseresultmap" >

SELECT user.* from user
</select>

The underlined data can then be displayed

MyBatis What to do when the tables in the database are underlined

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.