Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model.XXXX don't match BeforeSaveInterface, should be BeforeSave(*gorm.DB) error. Please see https://gorm.io/docs/hooks.html #174

Open
bohaoist opened this issue Dec 26, 2021 · 1 comment

Comments

@bohaoist
Copy link

目前生成的model中, BeforeSave函数原型为BeforeSave() error, 提示应该是BeforeSave(*gorm.DB) error,这里是什么原因呢?gorm版本v1.22.4

@jpmeijers
Copy link

I'm getting the same issue when I use the generated structs with gorm. Scanning results into a struct.

model.BillingBackendSite don't match BeforeSaveInterface, should be `BeforeSave(*gorm.DB) error`. Please see https://gorm.io/docs/hooks.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants