mirror of https://github.com/go-gorm/gorm.git
parent
48e41440af
commit
38f96c6514
|
@ -63,6 +63,9 @@ type Jsonb struct {
|
||||||
|
|
||||||
// Value get value of Jsonb
|
// Value get value of Jsonb
|
||||||
func (j Jsonb) Value() (driver.Value, error) {
|
func (j Jsonb) Value() (driver.Value, error) {
|
||||||
|
if len(j.RawMessage) == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
return j.MarshalJSON()
|
return j.MarshalJSON()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue