`

ibatis的result标签中用select

 
阅读更多

<select id="get-_properties" resultClass="accountproperties"

parameterClass="java.lang.String"> select propName, propValue from Properties where AcntIdx = #acntIdx# </select> <select id="getBankAccount" resultMap="bp_account-result-map" parameterClass="map"> select a.acntIdx, a.bankNo, a.bankName, a.acntNo, a.acntName, a.superIdx, a.regNo, a.regName, a.openBankName, a.areaCode, a.bankBranchCode, a.quota, a.floorBalance, a.memo, a.disabled, m.mnyname from a left outer join m on a.currencyno = m.mny where a.bankNo like '%$bank$%' order by a.acntIdx </select> <resultMap id="bp_account-result-map" class="accountview"> <result property="index" column="AcntIdx"/> <result property="bankNo" column="BankNo"/> <result property="bankName" column="BankName"/> <result property="accountNo" column="AcntNo"/> <result property="accountName" column="AcntName"/> <result property="superIndex" column="SuperIdx"/> <result property="regionNo" column="RegNo"/> <result property="regionName" column="RegName"/> <result property="openBankName" column="OpenBankName"/> <result property="areaCode" column="AreaCode"/> <result property="bankBranchCode" column="BankBranchCode"/> <result property="quota" column="Quota"/> <result property="floorBalance" column="FloorBalance"/> <result property="comment" column="Memo"/> <result property="disabled2" column="Disabled"/> <result property="labelList" column="AcntIdx" select="getOfAccount-bp_label"/> <result property="attributes2" column="AcntIdx" select="get-_properties"/>

<result property="txCodes" column="AcntIdx" select="get-bp_account_action"/> <result property="mnyName" column="mnyname"/> </resultMap>

 

 

 


 

分享到:
评论

相关推荐

    iBATIS动态标签

    iBATIS动态标签是SQL映射文件中的一种功能强大的特性,它允许在SQL语句中进行条件判断,根据传入的参数动态生成合适的查询条件。动态标签主要用于提高灵活性,使得SQL映射文件能够适应多种查询场景,而无需为每种...

    ibatis标签

    标题中的“ibatis标签”指的是在iBATIS框架中用于动态SQL的一个关键功能。iBATIS是一个优秀的持久层框架,它允许将SQL语句直接嵌入到Java代码中,简化了数据库操作。而`&lt;iterate&gt;`标签是iBATIS提供的一个便利的循环...

    ibatis动态SQL标签用法

    iBatis动态SQL标签用法 iBatis是Java持久层框架,提供了动态SQL标签来实现动态查询。动态SQL标签可以根据不同的条件生成不同的SQL语句,从而提高查询效率和灵活性。 动态SQL片段 iBatis提供了动态SQL片段的功能,...

    解决IBatis缓存动态字段问题

    通过在 `&lt;select&gt;` 标签中设置 `remapResults="true"`,可以有效地解决IBatis缓存动态字段带来的问题。这不仅避免了因缓存错误而导致的查询失败,还确保了程序能够灵活地处理动态表名和字段名。同时,需要注意的是,...

    ibatis总结 ibatis ibatis ibatis ibatis

    例如,`&lt;select&gt;`标签用于定义查询语句,`&lt;insert&gt;`、`&lt;update&gt;`和`&lt;delete&gt;`分别对应增删改操作。在SQL映射文件中,可以使用动态SQL来处理复杂的查询条件,如`&lt;if&gt;`、`&lt;choose&gt;`、`&lt;when&gt;`、`&lt;otherwise&gt;`等标签。 ...

    ibatis的dynamicSQL中,关于prepend的使用

    在ibatis中,`&lt;dynamic&gt;`标签是用来构建动态SQL的核心元素之一。当使用`&lt;dynamic&gt;`标签时,可以将一系列条件组合起来,根据参数的不同值来决定是否加入到最终的SQL语句中。例如,在给定的部分内容中,可以看到`...

    ibatis demo,ibatis例子,ibatis示例

    4. **动态SQL**:Ibatis的动态SQL功能非常强大,可以在XML映射文件中通过`&lt;if&gt;`、`&lt;choose&gt;`、`&lt;when&gt;`、`&lt;otherwise&gt;`、`&lt;where&gt;`等标签实现条件判断,使得SQL语句更加灵活。 5. **参数映射**:Ibatis支持多种方式...

    ibatis plugin用户指南

    5. **自动生成select语句**:在&lt;select&gt;标签处,按Alt+Enter选择Generate result for resultMap or resultClass,插件会根据parameterClass或parameterMap自动生成对应的select语句。 6. **SqlMapClient方法调用的...

    ibatis入门

    在 `select` 标签中,你可以使用 `&lt;if&gt;`、`&lt;choose&gt;`、`&lt;when&gt;`、`&lt;otherwise&gt;` 和 `&lt;where&gt;` 等标签来构建动态 SQL,根据传入参数的不同组合生成不同的 SQL 语句。 5. **单对象查询** 当需要查询单个对象时,可以...

    Ibatis入门例子,Ibatis教程

    例如,你可以通过使用`&lt;if&gt;`、`&lt;choose&gt;`等标签来编写条件语句,通过`&lt;resultMap&gt;`来定义复杂的对象关系映射。 学习Ibatis,不仅能够提高开发效率,还能使代码更加清晰、易于维护。随着对Ibatis的深入理解和实践,...

    ibatis资料ibatis资料

    1. **《iBATIS in Action》**: 这通常是一本关于iBATIS的书籍,可能深入介绍了iBATIS的原理、配置、使用方法以及最佳实践,对于学习和理解iBATIS非常有帮助。 2. **《ibatis Guide》**: 这可能是iBATIS的官方指南...

    ibatis_sqlMap的配置总结

    &lt;select id="findCustomers" parameterType="java.util.Map" resultMap="result_base"&gt; select * from customer where id=#value# and name=#name# &lt;/select&gt; ``` #### 六、结果集映射 iBatis的结果集映射机制...

    Spring对IBatis的整合

    &lt;select id="getProductListByCategory" resultMap="result"&gt; select productid, name, descn, category from product where category=#value# &lt;/select&gt; ``` ##### 2. IBatis DAO实现 接下来,创建一个继承自...

    ibatis 文档查询

    通过`&lt;resultMap&gt;`中的`&lt;result&gt;`标签和`select`属性,可以指定嵌套的查询,实现级联加载。在上述示例中,当查询Account时,会进一步触发查询Order和OrderItem,构建出完整的对象树。 4. **映射关系的继承** ...

    ibatis常用的sql

    根据提供的文件信息,本文将对ibatis常用的SQL语句进行详细的解析与说明。这些SQL语句主要用于Oracle数据库中,涉及到了删除、插入以及查询等基本操作,并且在ibatis框架中实现了参数化处理。 ### 一、删除操作 ...

    ibatis的dtd文件

    例如,`&lt;select&gt;`标签用于定义一个查询语句,可以包含SQL语句和其返回的结果集映射;`&lt;insert&gt;`标签则用于插入操作,允许指定动态SQL和返回的自增主键值;`&lt;update&gt;`和`&lt;delete&gt;`分别对应更新和删除操作,同样支持...

    ibatis多表查询过程

    在iBatis中,我们可以使用`&lt;select&gt;`标签来定义多表查询的SQL语句。 ### 3. 使用`&lt;include&gt;`标签 为了保持SQL语句的整洁和可重用性,可以使用`&lt;include&gt;`标签将公共部分的SQL语句提取出来。这样在多个查询中引用同...

    iBATIS 级联iBATIS 级联

    iBATIS 级联iBATIS 级联iBATIS 级联

    Ibatis开发实例

    &lt;select id="getProductListByCategory" resultMap="result"&gt; select productid, name, descn, category from product where category = #value# &lt;/select&gt; ``` 这里的关键点包括: - **命名空间** (`namespace...

Global site tag (gtag.js) - Google Analytics