liwu3230 opened a new issue #4345: Springboot+Jpa+sharding-jdbc 
跨多表查询走结果归并后,返回的数据类型不是包装类而被转成有默认值的基本数据类型
URL: https://github.com/apache/incubator-shardingsphere/issues/4345
 
 
   
![image](https://user-images.githubusercontent.com/39552013/74697000-61c07000-5234-11ea-87b1-499fbaae63d3.png)
   
![image](https://user-images.githubusercontent.com/39552013/74697059-7bfa4e00-5234-11ea-8ce8-9669fa427553.png)
   
图片中joinMsgTicketPmsMsgStatereport.get("result")对应的java类型是Integer,数据库字段类型为int(11),单表查询的时候如果查询结果中result字段为null,可以映射为null回来,但是如果是跨多表查询,走了结果归并的话,返回的会是0
 ,这与直接执行sql的结果不一致,在很多业务场景中null是有意义的
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to