ibatis 一对一,一对多
2013-12-06 17:37
260 查看
<resultMap class="XX" id="XX">
<result column="id" property="id" />
<result column="dd" property="dd" />
<result column="cc" property="satl_id" />
<result column="id" property="aa"
select="空间名.getXX" />
<result column="id" property="bb"
select="空间名.getXX" />
</resultMap>
<select id="getxx" resultClass="xx">
<![CDATA[
select * from xx where isdeleted = 0 and xx_id==#value#
]]>
</select>
class{
AA aa;
List<BB> bb;
}
<result column="id" property="id" />
<result column="dd" property="dd" />
<result column="cc" property="satl_id" />
<result column="id" property="aa"
select="空间名.getXX" />
<result column="id" property="bb"
select="空间名.getXX" />
</resultMap>
<select id="getxx" resultClass="xx">
<![CDATA[
select * from xx where isdeleted = 0 and xx_id==#value#
]]>
</select>
class{
AA aa;
List<BB> bb;
}
相关文章推荐
- 今天看到一份资料上有讲到Oracle分页优化
- Windows SharePoint Services 默认母版页
- Windows SharePoint Services 默认母版页
- HDU 1242 广搜模板
- Orge 安装
- 【Linux】Linux平台Cpu使用率的计算
- 数据库锁表
- 扫雷小游戏
- 从事企业级的项目开发
- 加载listview配合适配器的使用
- Highcharts + jQuery + Servlet 实现从后台获取JSON实时刷新图表
- android 自定义控件库(jar)时属性不能识别的来看吧
- 警惕常用这6种方式吃饭必得癌
- Selenium RC 环境搭建(eclipse)
- ASP.net 关于TextBox的TextMode=“PassWord”时的动态赋值
- java中关键字volatile的作用
- java基础知识2-编译单元
- windows phone开发之准备篇
- 机构间清算导入至核心
- Unity实现手机震动