Handling of null values without global configuration

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Handling of null values without global configuration

Kevin Chee
Hi, I have a query that retrieves Data from tables dynamically depending on the Table name. Currently the result is being stored in a hashmap, but it omits out null values.
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhMAAACzCAYAAAAzIJ7jAAAgAElEQVR4Ae2dy4ocORaGxw/Qz1KLWtRTeOeuNxiDwczWFLM0GGN6VWA8K9Ne9KqMF0N7Fu6NwZuh3V34Ddzj8jNkT8M0GnQNXY4iIlMRWRmRn8FEZaRCl6NP0q8jZegvin9YAAtgASyABbAAFmiwwF/yZ//880/1xx9/qN9//11tNhv+YwMYgAEYgAEYgIFeBhIxoUUEAgIBBQMwAAMwAAMwsA0DQUwgJABnG3AICy8wAAMwAAOeASMm/ve//+GRwIUFAzAAAzAAAzCwEwNGTPz3v//d6WGvSLiiTmEABmAABmDgeBkwYgIAjhcA6p66hwEYgAEYaGUAMYFLC68UDMAADMAADDQxgJgAoCaAWtUszzMjggEYgIHlM4CYQEwgJmAABmAABmCgiQHEBAA1AcSMYvkzCuqQOoQBGGhlADGBmEBMwAAMwAAMwEATA4gJAGoCqFXN8jwzIhiAARhYPgOICcQEYgIGYAAGYAAGmhhATABQE0DMKJY/o6AOqUMYgIFWBhATiAnEBAzAAAzAAAw0MYCYAKAmgFrVLM8zI4IBGICB5TOAmEBMICZgAAZgAAZgoIkBxAQANQHEjGL5MwrqkDqEARhoZQAxgZhATMAADMAADMBAEwOICQBqAqhVzfI8MyIYgAEYWD4DCxMTN+rVxaW6c+7+X7xTn5ciBr68U3d1vkfm+fPbl6PDhob45Qf16OIbde/7D2qz+U39+N036t53P6j/LMVGq8mns/3FU/XrZqP+89O36t7Ft+rHLwvvMD4+UyenZ+H/k48LL88WvP36/TddHV4/VfcuvlHPr+vlT8JvkU5oywt8xnL+jXr002/lBMXZTNttyHYHYQOT30Nqs4ffpyxMTHSNd6fBdusG+kk9Pr9Uj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Y6SDefqdD2OvkmegV0zkSxPuc4jHiIkhr4SGeBsxgWfiEKAnD3S+MAADMDAtAxOJCZ2pETPuLTdeWvHQCYqaOKhBUQtfu5/EM7WY8B4c9kyEJarE3oMenWnBJ23sCQMwAAPTMTChmLCZqv+aw4qN2sZLsVLNJsdOTPhNj/GeCfE5NzBVRYPbPNkfj/U4lBtAc+O7vRV+Y6Y0KPJrDgSExAX34AIGYGAlDEwuJvTgLu6L6Nl46QVB8csJ6WVQ4q8oouUI8Xu9FBKJEl15YrgoHlPBfhNmtKQiiYY8ruTXHFZEzf1ODW9DrrnY4zNMwAAMwMDcDMwiJqRMG48FLn5U+EpUuMQ49+iwYQAGjpWBPYmJ4Y2Xx1oBlJvOBwZgAAZgYOkM7ElMAMrSQSH/MAwDMAADMFBjADGB252lFxiAARiAARhoYgAxAUBNANVUKveZwcAADMDA8TCAmEBMICZgAAZgAAZgoIkBxAQANQHEzON4Zh7UNXUNAzBQYwAxgZhATMAADMAADMBAEwOICQBqAqimUrnPDAYGYAAGjocBxARiAjEBAzAAAzAAA00MICYAqAkgZh7HM/OgrqlrGICBGgOICcQEYgIGYAAGYAAGmhhATABQE0A1lcp9ZjAwAAMwcDwMICYQE4gJGIABGIABGGhiwIiJ33//vSkS1OfxqE/qmrqGARiAARjIGTBi4o8//kBMoEphAAZgAAZgAAZ2YsCIiT///HOnh3NlwmfUKgzAAAzAAAwcHwNGTCilFN6J46t8Gjx1DgMwAAMwMAUDQUxoQTFFhMQBmDAAAzAAAzBwXAwkYkILCr3kob0UbMo8LhBo+NQ3DMAADMDArgwUYkILCv5hASyABbAAFsACWGCsBf4PpmOELYls/VIAAAAASUVORK5CYII=" alt="" data-iml="321080.9750000008">
I have attempted callSettersOnNulls and using Custom TypeHandler but they both have to be declared in the global configuration. I have tried resultmap and attaching the TypeHandler to the column. But the query is dynamic so i would not be able to attach it to a column.

Is there a way that i can allow the hashmap to retain null values? or have the Custom TypeHandler only applies to this query? Thanks

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/fdab694c-4bf4-45a4-bd9b-d2a1dd78e08bn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Handling of null values without global configuration

Kevin Chee
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAhMAAACzCAYAAAAzIJ7jAAAgAElEQVR4Ae2dy4ocORaGxw/Qz1KLWtRTeOeuNxiDwczWFLM0GGN6VWA8K9Ne9KqMF0N7Fu6NwZuh3V34Ddzj8jNkT8M0GnQNXY4iIlMRWRmRn8FEZaRCl6NP0q8jZegvin9YAAtgASyABbAAFmiwwF/yZ//880/1xx9/qN9//11tNhv+YwMYgAEYgAEYgIFeBhIxoUUEAgIBBQMwAAMwAAMwsA0DQUwgJABnG3AICy8wAAMwAAOeASMm/ve//+GRwIUFAzAAAzAAAzCwEwNGTPz3v//d6WGvSLiiTmEABmAABmDgeBkwYgIAjhcA6p66hwEYgAEYaGUAMYFLC68UDMAADMAADDQxgJgAoCaAWtUszzMjggEYgIHlM4CYQEwgJmAABmAABmCgiQHEBAA1AcSMYvkzCuqQOoQBGGhlADGBmEBMwAAMwAAMwEATA4gJAGoCqFXN8jwzIhiAARhYPgOICcQEYgIGYAAGYAAGmhhATABQE0DMKJY/o6AOqUMYgIFWBhATiAnEBAzAAAzAAAw0MYCYAKAmgFrVLM8zI4IBGICB5TOAmEBMICZgAAZgAAZgoIkBxAQANQHEjGL5MwrqkDqEARhoZQAxgZhATMAADMAADMBAEwOICQBqAqhVzfI8MyIYgAEYWD4DCxMTN+rVxaW6c+7+X7xTn5ciBr68U3d1vkfm+fPbl6PDhob45Qf16OIbde/7D2qz+U39+N036t53P6j/LMVGq8mns/3FU/XrZqP+89O36t7Ft+rHLwvvMD4+UyenZ+H/k48LL88WvP36/TddHV4/VfcuvlHPr+vlT8JvkU5oywt8xnL+jXr002/lBMXZTNttyHYHY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cH32AUGYAAGYOAQGGgXE2bwHOuZGP45qBUUl8ouY6SDefqdD2OvkmegV0zkSxPuc4jHiIkhr4SGeBsxgWfiEKAnD3S+MAADMDAtAxOJCZ2pETPuLTdeWvHQCYqaOKhBUQtfu5/EM7WY8B4c9kyEJarE3oMenWnBJ23sCQMwAAPTMTChmLCZqv+aw4qN2sZLsVLNJsdOTPhNj/GeCfE5NzBVRYPbPNkfj/U4lBtAc+O7vRV+Y6Y0KPJrDgSExAX34AIGYGAlDEwuJvTgLu6L6Nl46QVB8csJ6WVQ4q8oouUI8Xu9FBKJEl15YrgoHlPBfhNmtKQiiYY8ruTXHFZEzf1ODW9DrrnY4zNMwAAMwMDcDMwiJqRMG48FLn5U+EpUuMQ49+iwYQAGjpWBPYmJ4Y2Xx1oBlJvOBwZgAAZgYOkM7ElMAMrSQSH/MAwDMAADMFBjADGB252lFxiAARiAARhoYgAxAUBNANVUKveZwcAADMDA8TCAmEBMICZgAAZgAAZgoIkBxAQANQHEzON4Zh7UNXUNAzBQYwAxgZhATMAADMAADMBAEwOICQBqAqimUrnPDAYGYAAGjocBxARiAjEBAzAAAzAAA00MICYAqAkgZh7HM/OgrqlrGICBGgOICcQEYgIGYAAGYAAGmhhATABQE0A1lcp9ZjAwAAMwcDwMICYQE4gJGIABGIABGGhiwIiJ33//vSkS1OfxqE/qmrqGARiAARjIGTBi4o8//kBMoEphAAZgAAZgAAZ2YsCIiT///HOnh3NlwmfUKgzAAAzAAAwcHwNGTCilFN6J46t8Gjx1DgMwAAMwMAUDQUxoQTFFhMQBmDAAAzAAAzBwXAwkYkILCr3kob0UbMo8LhBo+NQ3DMAADMDArgwUYkILCv5hASyABbAAFsACWGCsBf4PpmOELYls/VIAAAAASUVORK5CYII=" alt="" data-iml="16190.445000000182">

On Wednesday, 9 December 2020 at 15:55:37 UTC+8 Kevin Chee wrote:
Hi, I have a query that retrieves Data from tables dynamically depending on the Table name. Currently the result is being stored in a hashmap, but it omits out null values.

I have attempted callSettersOnNulls and using Custom TypeHandler but they both have to be declared in the global configuration. I have tried resultmap and attaching the TypeHandler to the column. But the query is dynamic so i would not be able to attach it to a column.

Is there a way that i can allow the hashmap to retain null values? or have the Custom TypeHandler only applies to this query? Thanks

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/d6f9613b-5700-40b8-a14b-c2758865006dn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Handling of null values without global configuration

Kevin Chee
In reply to this post by Kevin Chee
<select id="getContent" resultType="java.util.HashMap"> 
             SELECT '${table}' as TABLE, B.* 
             FROM 
            ${table} B WHERE id = #{id} 
</select>  

On Wednesday, 9 December 2020 at 15:55:37 UTC+8 Kevin Chee wrote:
Hi, I have a query that retrieves Data from tables dynamically depending on the Table name. Currently the result is being stored in a hashmap, but it omits out null values.

I have attempted callSettersOnNulls and using Custom TypeHandler but they both have to be declared in the global configuration. I have tried resultmap and attaching the TypeHandler to the column. But the query is dynamic so i would not be able to attach it to a column.

Is there a way that i can allow the hashmap to retain null values? or have the Custom TypeHandler only applies to this query? Thanks

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/2173073b-da3b-40f5-84ad-02ae78f39846n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Handling of null values without global configuration

Iwao AVE!
Hello Kevin,

If you cannot enable callSettersOnNulls, you may have to create a separate statement for that specific table with a POJO as its resultType.

Although there are exceptions, such a 'universal' select that returns a Map is an anti-pattern in general.
And the fact that you need the special null treatment implies that this particular query is different from the others.

Regards,
Iwao


On Wed, Dec 9, 2020 at 4:59 PM Kevin Chee <[hidden email]> wrote:
<select id="getContent" resultType="java.util.HashMap"> 
             SELECT '${table}' as TABLE, B.* 
             FROM 
            ${table} B WHERE id = #{id} 
</select>  

On Wednesday, 9 December 2020 at 15:55:37 UTC+8 Kevin Chee wrote:
Hi, I have a query that retrieves Data from tables dynamically depending on the Table name. Currently the result is being stored in a hashmap, but it omits out null values.

I have attempted callSettersOnNulls and using Custom TypeHandler but they both have to be declared in the global configuration. I have tried resultmap and attaching the TypeHandler to the column. But the query is dynamic so i would not be able to attach it to a column.

Is there a way that i can allow the hashmap to retain null values? or have the Custom TypeHandler only applies to this query? Thanks

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/2173073b-da3b-40f5-84ad-02ae78f39846n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/mybatis-user/CA%2Buep2RkFhr5x6r6vDJ%2B%3DmzaLbx984WxAwhxqm29eMvYOmYBHg%40mail.gmail.com.