C'est ça. Le point est l'attribut groupBy de resultMap = "A0160Plus"
◆SQLMap
<resultMap id="A0162ResultMapPlus" class="java.util.HashMap"
groupBy="A0162_NO">
<result column="SEIRINO" property="A0162_SEIRINO" />
<result column="BUYER_NO" property="A0162_BUYER_NO" />
<result column="A0162_NO" property="A0162_NO" />
<result column="A0162_NAME" property="A0162_NAME" />
</resultMap>
<resultMap id="A0164ResultMapPlus" class="java.util.HashMap"
groupBy="A0164_NO">
<result column="SEIRINO" property="A0164_SEIRINO" />
<result column="BUYER_NO" property="A0164_BUYER_NO" />
<result column="A0164_NO" property="A0164_NO" />
<result column="A0164_NAME" property="A0164_NAME" />
</resultMap>
<resultMap id="A0168ResultMapPlus" class="java.util.HashMap"
groupBy="A0168_NO">
<result column="SEIRINO" property="A0168_SEIRINO" />
<result column="BUYER_NO" property="A0168_BUYER_NO" />
<result column="A0168_NO" property="A0168_NO" />
<result column="A0168_NAME" property="A0168_NAME" />
</resultMap>
<resultMap id="A0160Plus" class="java.util.HashMap" groupBy="SEIRINO,BUYER_NO">
<result column="SEIRINO" property="SEIRINO" />
<result column="BUYER_NO" property="BUYER_NO" />
<result column="BUYER_NAME" property="BUYER_NAME" />
<result property="A0162" resultMap="user.A0162ResultMapPlus"
javaType="java.util.ArrayList" />
<result property="A0164" resultMap="user.A0164ResultMapPlus"
javaType="java.util.ArrayList" />
<result property="A0168" resultMap="user.A0168ResultMapPlus"
javaType="java.util.ArrayList" />
</resultMap>
<select id="getA0160Plus" resultMap="A0160Plus" parameterClass="Map">
select
c.seiriNo, c.buyer_no as buyer_no,c.buyer_name as buyer_name,
o.seiriNo as A0162_SEIRINO, o.buyer_no as A0162_BUYER_NO,o.A0162_no as
A0162_NO,o.A0162_name as A0162_NAME,
a.seiriNo as
A0164_SEIRINO,a.buyer_no as A0164_BUYER_NO, a.A0164_no as
A0164_NO,a.A0164_name as A0164_NAME ,
b.seiriNo as A0168_SEIRINO,b.buyer_no as A0168_BUYER_NO, b.A0168_no as
A0168_NO,b.A0168_name as A0168_NAME
from
((A0160z c
left outer
join
A0162 o on c.SEIRINO = o.SEIRINO and
c.buyer_no = o.buyer_no)
left
outer
join A0164 a on o.SEIRINO =
a.SEIRINO and o.buyer_no =
a.buyer_no )
left outer
join A0168 b on
c.SEIRINO = b.SEIRINO and c.buyer_no = b.buyer_no
order by c.SEIRINO ,
c.BUYER_NO,o.A0162_no,a.A0164_no,b.A0168_no
</select>
◆ côté java
・ Liste <Carte <Chaîne, Objet >> ListmapPlus = queryDAO.executeForObjectList("user.getA0160Plus", null);