标签:
1 privateInteger activityid; 2 privateList<Discuss> discusslist;//一对多
1 privateInteger id; 2 privateInteger activityid; 3 privateInteger userid; 4 privateString time; 5 privateString content;
1 <resultMaptype="com.travel.model.ActivitysWithBLOBs"id="discussActyWithBLOBs"extends="ResultMapWithBLOBs"> 2 <collectionproperty="discusslist"column="activityId"javaType="ArrayList"ofType="com.travel.model.Discuss"select="getDiscussByActId"/> 3 </resultMap> 4 <selectid="getDiscussByActId"resultType="com.travel.model.Discuss"parameterType="java.lang.Integer"> 5 <![CDATA[ 6 SELECT 7 discuss.id, 8 discuss.content, 9 discuss.time, 10 discuss.userId, 11 discuss.activityid 12 FROM 13 discuss 14 WHERE 15 discuss.activityId = #{activityId} 16 ]]> 17 </select>
标签:
原文地址:http://www.cnblogs.com/wang3680/p/9548308ac1d4d22058a91d44e5b6a857.html