我如何用Go编程语言在Google App Engine上实现一对多?
例如,如果我有下面的结构,我将如何存储多个投票到一个评论的关联?我是在注释结构中使用投票的键的数组(切片),还是在投票结构中使用一个注释的键?
type Comment struct {
Author string
Content string
Date datastore.Time
}
type Vote struct {
User string
Score int
}
https://stackoverflow.com/questions/6125345
复制相似问题