MyBatis resultType TreeMap - Does not show Null

0

I have a select with more than 200 columns, so the resultType I use is a TreeMap.

<select id="getUsuarios" resultType="java.util.TreeMap">
    SELECT * FROM USUARIOS
</select>

The structure of the table would look like this:

ID  NOMBRE  VALOR1  VALOR2  VALOR3 ...
-----------------------------------
1    Pepe   (null)    2     (null)
2    Juan     3     (null)  (null)
.
.
.

Now if we go through the List<TreeMap> , we only see the columns ID, NOMBRE, VALOR2 and in the second cycle: ID, NOMBRE, VALOR1

So the question is: How can you return all the columns, even if it's Null or empty?

    
asked by nachfren 22.05.2018 в 16:06
source

0 answers