当前位置: 代码迷 >> SQL >> SQL 地图ping in ibatis
  详细解决方案

SQL 地图ping in ibatis

热度:30   发布时间:2016-05-05 12:33:05.0
SQL mapping in ibatis
Here we can see a SQL SELECT statement that returns address data.

<select id="getAddress"parameterClass="int"resultClass="Address">SELECTADR_ID as id,ADR_DESCRIPTION as description,ADR_STREET as street,ADR_CITY as city,ADR_PROVINCE as province,ADR_POSTAL_CODE as postalCodeFROM ADDRESSWHERE ADR_ID = #id#</select>


The Java code
used to execute this statement would be:
Address address = (Address) sqlMap.queryForObject("getAddress",new Integer(5));


  相关解决方案