How to receive data with map while all the columns are nulls

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

How to receive data with map while all the columns are nulls

王乔

SQL like this:

select sum(a) daypay,sum(b) busget,sum(c) subsidy from table;

Trying to use

Map<String,Object>

to store the result.

I'm expecting

{daypay:null,busget:null,subsidy:null}

But it actually is just null.


ps:

tried
mybatis.configuration.map-underscore-to-camel-case=true
not working,this setting only differs while at least one column is not null.

Thanks you for reading.

--
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].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to receive data with map while all the columns are nulls

Guy Rouillier-2
returnInstanceForEmptyRow, since 3.4.2


 
--
Guy Rouillier

------ Original Message ------
From: "王乔" <[hidden email]>
To: "mybatis-user" <[hidden email]>
Sent: 5/17/2018 11:03:37 PM
Subject: How to receive data with map while all the columns are nulls

SQL like this:

select sum(a) daypay,sum(b) busget,sum(c) subsidy from table;

Trying to use

Map<String,Object>

to store the result.

I'm expecting

{daypay:null,busget:null,subsidy:null}

But it actually is just null.


ps:

tried
mybatis.configuration.map-underscore-to-camel-case=true
not working,this setting only differs while at least one column is not null.

Thanks you for reading.

--
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].
For more options, visit https://groups.google.com/d/optout.

--
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].
For more options, visit https://groups.google.com/d/optout.