<resultMap type="Answer" id="answer">
<id property="id" column=""/>
<result property="answer" column=""/>
<collection property="oid" ofType="int">
<constructor>
<arg column=""/>
</constructor>
</collection>
<collection property="name" ofType="java.lang.String"> <constructor>
<arg column=""/>
</constructor>
</collection>
</resultMap>
通过Integer和String的构造函数注入,具体的字段名称自己对好入座
mybatis 对象中属性 包含List<String>这种一对多映射怎么处理
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.