You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<selectid="querySellerSupplierNotice"resultType="Message">
SELECT
a.id,
a.create_time as message_create_time,
a.content,
b.title,
c.subdomain,
b.id as bid,
c.id as cid
FROM
message a
INNER JOIN supplier b
ON
a.user_id = b.user_id
LEFT JOIN site c
ON
a.user_id = c.user_id
INNER JOIN ln_seller2product d
ON a.user_id =
d.supplier_user_id
WHERE a.type
= 'corpnews'
AND a.create_time >
date_sub(curdate(), interval 90 day)
AND a.STATE = 1
AND d.seller_user_id =
#{sellerId}
ORDER BY
a.create_time DESC,b.title DESC
</select>
<resultMaptype="Message"id="sellerSupplierMap">
<idproperty="id"column="id" />
<resultproperty="content"column="content" />
<resultproperty="createTime"column="message_create_time" />
<associationproperty="supplier"column="user_id"javaType="Supplier">
<idproperty="id"column="bid" />
<resultproperty="title"column="title" />
</association>
<associationproperty="site"column="user_id"javaType="Site">
<idproperty="id"column="cid" />
<resultproperty="subdomain"column="subdomain" />
</association>
</resultMap>
this select will return over 70 rows but a lot of them are totally duplicated.
If I use resultType="hashmap" or resultType="Message" it will returns all rows.
But I use the resultMap above, mybatis will automatically ignore the duplicated rows, and returns a small list than expected.
I don't think it's appropriate for mybatis to drop rows under any scenario.
The text was updated successfully, but these errors were encountered:
I have a resultMap definition:
this select will return over 70 rows but a lot of them are totally duplicated.
If I use resultType="hashmap" or resultType="Message" it will returns all rows.
But I use the resultMap above, mybatis will automatically ignore the duplicated rows, and returns a small list than expected.
I don't think it's appropriate for mybatis to drop rows under any scenario.
The text was updated successfully, but these errors were encountered: