现在对于结构体零值不更新的问题,官方好像给的说法只能用map,但是个人觉得map代码的可读性没有用结构体看起来工整,还需要自己定义对应的字段名字符串,这个有比较合适的解决方案吗。
个人觉得这里不应该通过零值去判断是否,考不考虑引入指针,通过指针是否为nil判断是否修改。
Comment From: github-actions[bot]
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the Question template, most likely your question already answered https://github.com/go-gorm/gorm/issues or described in the document https://gorm.io ✨ Search Before Asking ✨
Comment From: a631807682
duplicated of https://github.com/go-gorm/gorm/issues/4297