springboot mybatis example:
@Select({"select id,xx from table where id=#{id}"})
Map<String,Object> queryById(@Param("id") Long id);
if table xx is null, the returned map does not contains xx key.
I search for a long time,
mapper.xml could configure <setting name="callSettersOnNulls" value="true"/>
could solve my problem, but I do not use xml configuration mode, how to config param callSettersOnNulls using mybatis annotation??
i say no, callSettersOnNulls now only support the global configuration, it can't support on specific method
see the source code of mybatis: