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

Bug: cache umarshalling custom JSONB type fails #14

Open
ivanvanderbyl opened this issue Jan 25, 2022 · 1 comment
Open

Bug: cache umarshalling custom JSONB type fails #14

ivanvanderbyl opened this issue Jan 25, 2022 · 1 comment

Comments

@ivanvanderbyl
Copy link

We have a number of fields which store arrays of enum string values in JSONB columns. When we get a cache hit, it instead returns this error:

unmarshal field borders: invalid character '\\x00' looking for beginning of value

Ent schema in question:

// in ent/schema/route.go
field.JSON("borders", customfield.Borders{}),

// in customfield/borders.go
type Border string
type Borders []Border
const (
	BorderAIR     Border = "AIR"
	BorderLAND    Border = "LAND"
	BorderSEA     Border = "SEA"
	BorderUnknown Border = "UNKNOWN"
)

Is there something we need to implement for cache marshalling/unmarshalling into the cache?

@bearchit
Copy link

bearchit commented Feb 21, 2022

@a8m Any progress on this issue?

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