码迷,mamicode.com
首页 > 其他好文 > 详细

mybatis组合实体查询

时间:2019-02-03 12:16:07      阅读:243      评论:0      收藏:0      [点我收藏+]

标签:mat   ltm   ati   ken   div   common   mapper   comm   int   

mybatis组合实体查询

<resultMap id="wxIndexMap" type="com.o2o.common.model.wxuntity.WxIndexNewMatter">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="INTEGER" property="type" />
<association property="detail_img" column="{orid=id,modulartype=type}" select="selectDetail_img"></association>
<association property="likenumber" column="{orid=id,modulartype=type}" select="com.o2o.common.dao.wx.CM_Com_LikeMapper.selectLikenumber"></association>
</resultMap>

通过这个select可以进行二次查询

问题记录:

如果采用的是collection标签,一次使用太多,jdk不会让进行运行的,

mybatis组合实体查询

标签:mat   ltm   ati   ken   div   common   mapper   comm   int   

原文地址:https://www.cnblogs.com/xiufengchen/p/10349882.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!