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

Implement the Valuer/Scanner interface #694

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alimoli
Copy link

@alimoli alimoli commented Feb 19, 2024

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.

[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

@alimoli alimoli changed the title Pluck panics in a busy connection and canceled context Implement the Valuer/Scanner interface May 29, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant