Can Mybatis return a Map collection with attribute values-> attribute values?

needs to use the returned result of an attribute value corresponding to id->. Currently, you can only return List, with two columns and convert it using Stream. Does Mybatis natively support this feature?


    select
        id,
        sum(money)
    from table_name
    where parentId = -sharp{parentId}
    group by id
</select>

I"ve tried this method and it seems that it can only return Map < Long,Map < String,Object > >, so is there any good way?

May.24,2021

it should be OK to use List < HashMap < String,string > >. The returned value is id:idvalue,sum (money): sum (money) value

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e48da1-43a21.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e48da1-43a21.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?