この問題は、あなたが最初にあなたのコードをチェックする必要があります。
小さなエラーコードのいずれか、または論理エラー、
サイクル・コールは、より慎重に検討していると思われる場合は、
私の質問:
サイクルコール:彼は彼自身の列を持つ親エンティティは、リストは、サブ列のセットが含まれています。両方がマッピングこのresultMapの結果である自分自身を呼び出します。呼び出す無限ループになります。
エラーコード:
<resultMap id="newsLabelMap" type="newsLabel">
<id property="id" column="id"/>
<result property="name" column="label_name"/>
<result property="content" column="label_content"/>
<association
property="parent"
javaType="NewsLabel"
select="selectNewsLabelByChild"
column="pid"
/>
<collection
property="child"
ofType="NewsLabel"
select="selectNewsLabelByParent"
column="id"
javaType="ArrayList"/>
<select id="selectNewsLabelByChild" resultMap="newsLabelMap">
select * from newlabel where id=#{pid}
</select>
<select id="selectNewsLabelByParent" resultMap="newsLabelMap">
select * from newlabel where pid=#{id}
</select>