mybatis组合实体查询

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不会让进行运行的,

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