A summary of the attention points of the configuration file of Ibatis framework

Source: Internet
Author: User

1. Points to note in configuration file Sqlmap.xml

Like what:

<?xml version= "1.0" encoding= "UTF-8"? ><! DOCTYPE sqlmap Public "-//ibatis.apache.org//dtd SQL Map 2.0//en" "Http://ibatis.apache.org/dtd/sql-map-2.dtd" > <sqlmap namespace= "Dbo_hishop_oren" > <resultmap id= "orderretuenresult" class= " Com.temp.model.OrderRetuenModel "> <result column=" retuid "property="Retuid"Jdbctype=" VARCHAR "/> <result column=" OrderId "property="OrderID"Jdbctype=" VARCHAR "/> <result column=" UserId "property="userid"Jdbctype=" INTEGER "/> <result column=" Linkman "property="Linkman"Jdbctype=" VARCHAR "/> </resultMap> <sql id=" Where_clause "> <isnotempty prepend=" and "property="Retuid"> Retuid = #retuid: varchar# </isNotEmpty> <isnotempty prepend=" and "property="OrderID"> OrderId = #orderid: varchar# </isNotEmpty> <isnotempty prepend=" and "property="userid> UserId = #userid: integer# </isNotEmpty> <isnotempty prepend= "and" property= "Linkman"> Linkman = #linkman: varchar# </isNotEmpty> <isnotempty property=" Criteria "> <iterate P roperty= "Criteria" conjunction= "and" prepend= "and" open= "(" close= ")" > $criteria [].paramname$ $criteria [].arith metictype$ #criteria [].paramvalue# </iterate> </isNotEmpty> </sql>

  

Where the value of property= is the name of the attribute field in the JavaBean , be sure to match the name of the property in the Java bean, otherwise there will be an error exception, it is not easy to find errors, so remember

A summary of the attention points of the configuration file of Ibatis framework

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.