<resultMap type="opportunity" id="opportunityMap">
<id property="id" column="id"/>
<result property="userId" column="userId"/>
<result property="creator" column="creator"/>
<result property="userName" column="userName"/>
<result property="createDate" column="createDate"/>
<collection property="teamInfo" ofType="simpleUser">
<id property="id" column="TID"/>
<result property="username" column="TNAME"/>
</collection>
</resultMap>
collection 标签里面就是多那个对象
追问这是在xml里注册resultmap
要在java 类中注解resultmap如何办
追答没用过mybatis的注解
官方文档都不推荐使用注解,为什么一定要用注解呢
映射文件挺好用的啊,可读性比注解好多了,写起来也不麻烦
追问嗯
注解方便 少量编码可以完成目的
没有resultmap的注解?
本回答被提问者采纳