ibatis2
</resultMap>
<resultMap id="MetaTableMap" class="a.b.model.MetaTable" groupBy="TABLE_ID">
<result property="IS_COMMON" column="IS_COMMON"/>
<result property="TABLE_ID" column="TABLE_ID"/>
<result property="TABLE_LOG_NAME" column="TABLE_LOG_NAME"/>
<result property="metaColumn" resultMap="MetaColumn.MetaColumnMap" />
</resultMap>
<resultMap id="MetaColumnMap" class="iita.itfind.model.MetaColumn" >
<result property="COLUMN_ID" column="COLUMN_ID"/>
<result property="TABLE_ID" column="TABLE_ID"/>
<result property="COLUMN_PHY_NAME" column="COLUMN_PHY_NAME"/>
<result property="COLUMN_LOG_NAME" column="COLUMN_LOG_NAME"/>
</resultMap>
mybatis
<resultMap id="MetaTableMap" type="MetaTable">
<result property="IS_COMMON" column="IS_COMMON"/>
<result property="TABLE_ID" column="TABLE_ID"/>
<result property="TABLE_LOG_NAME" column="TABLE_LOG_NAME"/>
<collection property="metaColumn" ofType="MetaColumn">
<id property="COLUMN_ID" column="COLUMN_ID"/>
<result property="TABLE_ID" column="TABLE_ID"/>
<result property="COLUMN_PHY_NAME" column="COLUMN_PHY_NAME"/>
<result property="COLUMN_LOG_NAME" column="COLUMN_LOG_NAME"/>
</collection></resultMap>
댓글