gorm.io/driver/sqlserver
../../pkg/mod/gorm.io/driver/sqlserver@v1.0.9/update.go:13:18: cannot use db (type gorm.DB) as type callbacks.Config in argument to callbacks.Update
gorm.io/driver/postgres
../../pkg/mod/gorm.io/driver/postgres@v1.1.2/postgres.go:46:3: unknown field 'WithReturning' in struct literal of type callbacks.Config
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 2 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: bestgopher
@jinzhu I also encountered the same problem.
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 2 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: counten
@jinzhu I also encountered the same problem: postgres@v1.1.0\postgres.go:47:3: unknown field 'WithReturning' in struct literal of type callbacks.Config
Comment From: jinzhu
upgrade both gorm.io/gorm and drivers to latest version
fusion @.***>于2021年11月4日 周四上午11:57写道:
@jinzhu https://github.com/jinzhu I also encountered the same problem: @.***\postgres.go:47:3: unknown field 'WithReturning' in struct literal of type callbacks.Config
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/go-gorm/gorm/issues/4822#issuecomment-960435411, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAABVO6W7L4WL4QW4LARAJDUKIAC5ANCNFSM5HFFGMFA .
-- Best regards
Jinzhu github.com/jinzhu
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 2 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: bestgopher
@fusion813 run go get -u gorm.io/gorm
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 2 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: rwrz
For others facing the same problem, I could fix it by running the following code:
go get -u gorm.io/driver/postgres
One of my dependencies also use gorm and it was downgrading the Postgres drivers.