I have a entity EmergencyCase that has 2 embedded structs (1 array and 1 struct) When I try to save the EmergencyCase by calling:
datastore.Put(c, key, &ec)
Everything is stored fine except the Pos field (type Position). There is no error or log entry about this. It is just not stored. Any suggestions?
Here are my 3 entities definitions:
type Position struct{
lon float32
lat float32
}
type EmergencyCase struct{
// Autogenerated id, not stored in the database.
ID string `datastore:"-"`
CreatedAt time.Time
Closed bool
ClosedByUser bool `datastore:",noindex"`
AutoClosed bool `datastore:",noindex"`
Pos Position
Events []Event
}
type Event struct{
// Autogenerated id, not stored in the datastore.
ID string `datastore:"-"`
CreatedAt time.Time
Name string `datastore:",noindex"`
}