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
slices.Map does not handle a nullable JSONB field. gobuffalo/nulls has replacements for the built-in null types in the sql package, but since jsonb is not a sql native type, there is no null handling in that package.
(I have a fix that I am experimenting with locally, so will create a PR and link to that in a moment.)
Steps to Reproduce the Problem
Add a fizz migration with a nullable jsonb field: add_column("table", "column", "jsonb", {"null": true})
Attempt to retrieve an object from that table. (In my case, I'm using Insomnia to call to the api.)
Expected Behavior
The JSONB field to be marshalled as a null object.
Actual Behavior
Error from API:
"error": "scan source was not []byte nor string but <nil>"
Info
Pop (through Buffalo): github.com/gobuffalo/pop/v5@v5.3.3
Go: go1.16.2 darwin/amd64
MacOS: 10.14.6 (18G6032)
The text was updated successfully, but these errors were encountered:
Description
Feature request: a nullable JSONB field.
slices.Map
does not handle a nullable JSONB field.gobuffalo/nulls
has replacements for the built-in null types in thesql
package, but since jsonb is not asql
native type, there is no null handling in that package.(I have a fix that I am experimenting with locally, so will create a PR and link to that in a moment.)
Steps to Reproduce the Problem
add_column("table", "column", "jsonb", {"null": true})
Expected Behavior
The JSONB field to be marshalled as a null object.
Actual Behavior
Error from API:
Info
Pop (through Buffalo): github.com/gobuffalo/pop/v5@v5.3.3
Go: go1.16.2 darwin/amd64
MacOS: 10.14.6 (18G6032)
The text was updated successfully, but these errors were encountered: