Google Golang 中的数据存储嵌套实体
Google Datastore nested entity's in Golang
我在设计模型时遇到了一些问题,
因为我的模型包含一个切片的切片并且我得到一个错误
flattening nested structs leads to a slice of slices
设计类似东西的最佳方法是什么
我更愿意更改我的设计,而不是像 post:
中建议的那样创建我自己的序列化方法
Loading datastore entities from Python project in Go leads to nested structs slices of slices error
type Inner2 struct {
Y float64
inner3 []Inner3
}
type Inner3 struct {
Z bool
}
type Outer struct {
A int16
I []Inner2
}
cloud.google.com/go/datastore 将在几天内修复此问题 -- 支持嵌套实体值!
有关详细信息,请参阅此处 post:
https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg
我在设计模型时遇到了一些问题, 因为我的模型包含一个切片的切片并且我得到一个错误
flattening nested structs leads to a slice of slices
设计类似东西的最佳方法是什么
我更愿意更改我的设计,而不是像 post:
中建议的那样创建我自己的序列化方法Loading datastore entities from Python project in Go leads to nested structs slices of slices error
type Inner2 struct {
Y float64
inner3 []Inner3
}
type Inner3 struct {
Z bool
}
type Outer struct {
A int16
I []Inner2
}
cloud.google.com/go/datastore 将在几天内修复此问题 -- 支持嵌套实体值!
有关详细信息,请参阅此处 post: https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg