func putClass(c appengine.Context, cls *classes.Class) { key := classes.NewClassKey(c, cls.ID) if _, err := datastore.Put(c, key, cls); err != nil { panic(err) } }
func (s *Student) key(c appengine.Context) *datastore.Key { return datastore.NewKey(c, "Student", s.ID, 0, classes.NewClassKey(c, s.ClassID)) }