<resultMap id="***ResultMap" type="GroupDO"> <id column="source_id" jdbcType="BIGINT" property="sourceId"/> <collection property="bIdList" ofType="Long" javaType="ArrayList"> <result column="b_id"/> </collection> </resultMap>
<sql id="SourceBuGroup_Column_List"> source_id,b_id </sql>
public class GroupDO implements Serializable { private Long sourceId; private List<Long> bIdList; }
本文介绍了一个具体的 MyBatis resultMap 配置示例,展示了如何通过 resultMap 映射复杂的数据结构,包括基本属性映射及集合属性映射的方法。
1153

被折叠的 条评论
为什么被折叠?



