Ibatis and mybatis, ibatismybatis

Source: Internet
Author: User

Ibatis and mybatis, ibatismybatis

Ibatis inherits SqlMapClientDaoSupport from the daoImpl layer to implement the dao layer interface. This. getSqlMapClientTemplate (). queryForObject ("User. queryById", Id );

The dao interface of mybatis, which is directly queried in the xml file.

Changes from ibatis to mybatis:

  • Like the global configuration file, the root element is changed from <sqlMap> to <mapper> due to changes in the DTD constraints.
  • <Select> change the parameterClass attribute of the element to the parameterType attribute.
  • <Select> change the resultClasss attribute of the element to the resultType attribute.
  • The class attribute of <parameterMap> and other elements is changed to the type attribute.
  • <Result> the columnIndex attribute of the element is removed.
  • The nested parameter is changed from # value # To # {value }.
  • In the jdbcType attribute values of <parameter> and other elements, the original "ORACLECURSOR" value is changed to the current "CURSOR", and "NUMBER" value is changed to "NUMERIC ".

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.