Index: service/datastore/interface.go |
diff --git a/service/datastore/interface.go b/service/datastore/interface.go |
index 6c954b9006025c284ef2156a58e8fa20d6cf18a4..440ea36541c7f5d4b143605262a1dccf8887d4f4 100644 |
--- a/service/datastore/interface.go |
+++ b/service/datastore/interface.go |
@@ -63,8 +63,8 @@ type Interface interface { |
// - *S where S is a struct |
// - a PropertyLoadSaver |
// |
- // It is expected that the struct or PropertyLoadSaver exposes the |
- // following metadata (as retrieved by PropertyLoadSaver.GetMeta): |
+ // It is expected that the struct exposes the following metadata (as retrieved |
+ // by MetaGetter.GetMeta): |
// - "key" (type: Key) - The full datastore key to use. Must not be nil. |
// OR |
// - "id" (type: int64 or string) - The id of the Key to create |
@@ -73,6 +73,12 @@ type Interface interface { |
// object's type. |
// - "parent" (optional, type: Key) - The parent key to use. |
// |
+ // By default, the metadata will be extracted from the struct and its tagged |
+ // properties. However, if the struct implements MetaGetterSetter it is |
+ // wholly responsible for exporting the required fields. A struct that |
+ // implements GetMeta to make some minor tweaks can evoke the defualt behavior |
Vadim Sh.
2015/10/30 21:56:50
typo: defualt
|
+ // by using GetPLS(s).GetMeta. |
+ // |
// If a required metadata item is missing or of the wrong type, then this will |
// return an error. |
KeyForObjErr(src interface{}) (*Key, error) |