Valuer/Scanner interface is defined for a custom type, but I get the following error:
define a valid foreign key for relations or implement the Valuer/Scanner interface
The custom type has a pointer to another type.
The test passes if I convert the pointer to just a structure.
It seems the problem also affects the anonymous public fields.
[error] invalid field found for struct gorm.io/playground.User's field State: define a valid foreign key for relations or implement the Valuer/Scanner interface
2024/05/29 12:01:59 Failed to drop table, got error invalid field found for struct gorm.io/playground.User's field State: define a valid foreign key for relations or implement the Valuer/Scanner interface
exit status 1
Explain your user case and expected results
Valuer/Scanner interface is defined for a custom type, but I get the following error:
define a valid foreign key for relations or implement the Valuer/Scanner interface
The custom type has a pointer to another type. The test passes if I convert the pointer to just a structure. It seems the problem also affects the anonymous public fields.