mybatis 對象中屬性 包含List<String>這種一對多映射怎麼處理

<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的構造函數注入,具體的字段名稱自己對好入座
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章