gen icon indicating copy to clipboard operation
gen copied to clipboard

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

Open bohaoist opened this issue 4 years ago • 1 comments

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

bohaoist avatar Dec 26 '21 05:12 bohaoist

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

jpmeijers avatar Jun 03 '22 15:06 jpmeijers