Code Specification
Things are not big, but when it happens, there will be bugs, how to debug their own do not come out.
The thing is this: the big night of the Cheerful debugging code, and nothing, just want to debug the HAP framework of the query.
<?xml version= "1.0" encoding= "UTF-8"?> <! DOCTYPE Mapper Public "-//mybatis.org//dtd mapper 3.0//en" "Http://mybatis.org/dtd/mybatis-3-mapper.dtd" > < Mapper namespace= "Com.hand.core.demo.mapper.HapOrgCompanysMapper" > <resultmap id= "baseresultmap" type= " Com.hand.core.demo.dto.HapOrgCompanys "> <result column=" company_id "property=" CompanyID "jdbctype=" DECIMAL "/ > <result column= "company_number" property= "Companynumber" jdbctype= "VARCHAR"/> <result colum N= "Company_Name" property= "CompanyName" jdbctype= "VARCHAR"/> </resultMap> <sql id= "Base_column_list" &
Gt Company_id,company_number,company_name </sql> <select id= "FindAll" parametertype= "Com.hand.core.demo.dto". Haporgcompanys "resultmap=" Baseresultmap "> select <include refid=" Base_column_list "/> from Hap_or G_companys </select> </mapper>
above is the MyBatis configuration file, the file does not write a problem (see there is no), such as:
<result column= "company_id" property= "CompanyID" jdbctype= "DECIMAL"/>
Column corresponds to the field of the database, CompanyID corresponding to the entity class Haporgcompanys field, directly are copied over, but in the run, the total error, CompanyID in the entity class Haporgcompanys can not find, How to debug all is so, finally helpless to the entity class CompanyID field changed to company_id, incredibly again can ... I am also very desperate, do not know why. and then this morning to debug, suddenly heard the hump naming rules, holding a trial mentality, the CompanyID changed to CompanyID. Incredibly can, can, can.