You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First encountered with 1.25.6, also occurs in 1.25.12 (latest) and master (dev).
OS: Linux Mint 22 and Debian 12
Arch: amd64 and arm64
Go: 1.22.0
Driver used: sqlite (though it should be driver-independent)
Tbf while i do have a bit of interest into creating an PR, i dont know how i should fix this.
My only guess is to use the value in field.Serializer when creating the serializer struct?
GORM Playground Link
go-gorm/playground#770
Description
When i save a struct with a json serializer field and nil value, gorm panics with this stacktrace:
After debugging it seems that the schema.Field has the Serializer set with a jsonserializer.
But when it creates the serializer instance in
gorm/schema/field.go
Line 494 in deceebf
Then it will panic in
gorm/schema/field.go
Line 964 in deceebf
SerializeValuer is never used again in the codebase.
The text was updated successfully, but these errors were encountered: