MyBatis query result in a HashMap?
26,505
<select id="selectAllCategories" resultType="hashmap">
select id, name from categories
</select>
and More details here
Author by
V R
Updated on December 24, 2020Comments
-
V R over 3 years
For the below query,
SELECT MSGS.MSGTYPE, count(*) as NOOFRECORDS FROM SCHEMA.MESSAGES MSGS GROUP BY MSGS.MSGTYPE
What would be the equivalent in MyBatis mapper so that I can get a Result as a HashMap with MSGS.MSGTYPE as the key and NOOFRECORDS as the value ?