Failed to convert property value of type ‘null‘ to required type ‘double‘ for property ‘balance‘解决方案
网上方法
解决
源代码:
private int id;
private String name;
private double balance;
只需要把int
和double
换成整数和小数的包装类Integer
和Double
就可以了
private Integer id;
private String name;
private Double balance;
最后重新生成get
和set
方法,重新运行
我用了 IFNULL(max(chg),0) as chg