here is my struct:
type AreaPrerequisite struct {
SideQuestId int //
SideQuestProg int // progress
}
type AreaInfo struct {
Id int `datastore:""`
Name string `datastore:",noindex"`
ActionPoint int `datastore:",noindex"`
Prerequisite AreaPrerequisite `datastore:",noindex"`
// ignored:
DsMonsters []byte `datastore:"-"`
DsStages []byte `datastore:"-"`
Monsters AreaMonsters `datastore:"-"`
Stages []*StageEntry `datastore:"-"`
}
and my put() call:
key := datastore.NewKey(c, "Area", "", int64(pArea.Id), nil)
_, err := datastore.Put(c, key, *pArea)
if err != nil {
return err
}
It gives me the following error when try to put to DS:
datastore: invalid entity type
I checked the doc: https://developers.google.com/appengine/docs/go/datastore/reference
datastore:"-" should mark some non-supported fields ignored by datastore. Don't know why it is failing.