model.proto file: import "google/protobuf/wrappers.proto"; message Entity { google.protobuf.UInt32Value myField = 1; } entity.go file: import ( "database/sql" ) type Entity struct { MyField sql.NullInt64 } Mapper to Insert entity import ( "github.com/golang/protobuf/ptypes/wrappers" "database/sql" ) if entity.MyField != nil { toinsert.MyField = sql.NullInt64{ Int64: int64(entity.MyField.GetValue()), Valid: true} } Mapper to return to FE, empty values will show up with value "null" if entity.MyField.Valid { toReturn.MyField = &wrappers.UInt32Value{Value: uint32(entity.MyField.Int64)} }