如果联表查询结果为:
Id Name Score
1 张三 50
2 李四 null
在grom 中会把null自动补充为上一条记录值,实际返回结果为:
Id Name Score
1 张三 50
2 李四 null
解决方案:
如果为mysql则用ifnull(Name,0)
如果数据库为postgresql 用COALESCE(Name,'')
如果联表查询结果为:
Id Name Score
1 张三 50
2 李四 null
在grom 中会把null自动补充为上一条记录值,实际返回结果为:
Id Name Score
1 张三 50
2 李四 null
解决方案:
如果为mysql则用ifnull(Name,0)
如果数据库为postgresql 用COALESCE(Name,'')