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
Sounds like a GORM issue to me. I don't use it and I can't provide support for it.
I would suggest that after you unmarshal the JSON input, check whether null.Time is properly set to null or not. If it looks OK, then it's almost certainly a GORM issue.
I feel a better option would be to use the Golang stdlib data structures for null SQL values. Those will generally be supported by all Golang ORMs, including GORM as their documentation on model declaration specifically uses them (https://gorm.io/docs/models.html).
Unfortunately, you will need to have logic to copy the data from the source type into the destination type. However, you would have incurred that "extra" step no matter what.
The text was updated successfully, but these errors were encountered: