mybatis association和collection标签怎么用
转载
- <resultMap type="Bill" id="ResultBill">
- <id property="id" column="id"/>
- <result property="dh" column="dh" />
- <result property="rq" column="rq"/>
- <association property="author" javaType="Author" >
- <id property="id" column="idAutor" />
- <result property="name" column="authorName" />
- <result property="email" column="authorEmail"/>
- </association>
- <collection property="det1" javaType="ArrayList" ofType="BillDet1" >
- <id property="id" column="idDet1"/>
- <result property="dh" column="dhDet1"/>
- <result property="wlbm" column="wlbm"/>
- <result property="wlmc" column="wlmc"/>
- <result property="unit" column="unit"/>
- <result property="qty" column="qty"/>
- </collection>
- </resultMap>
- <resultMap type="com.sailod.shiro.dto.HtAuthorityMenuDTO" id="OneMenuAuthority">
- <id property="htAuthorityId" column="htAuthorityId" javaType="java.lang.Long" />
- <result property="name" column="name" javaType="java.lang.String" />
- <result property="currentUserId" column="currentUserId" javaType="java.lang.Long" />
- <collection property="htAuthorityDTO" ofType="com.sailod.shiro.dto.HtAuthorityDTO"
- select="selectAuthority" column="{htAuthorityId2 = htAuthorityId ,currentUserId2 = currentUserId}" >
- </collection>
- </resultMap>
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。