| Index: service/datastore/multiarg.go
|
| diff --git a/service/datastore/multiarg.go b/service/datastore/multiarg.go
|
| index 0e24feb041d44c069268c033cba666d3167f9781..ab335c9ef634ba1ab4fa5817ecf3b649231a229f 100644
|
| --- a/service/datastore/multiarg.go
|
| +++ b/service/datastore/multiarg.go
|
| @@ -99,7 +99,7 @@ func multiArgTypePLS(et reflect.Type) multiArgType {
|
| return slot.Addr().Interface().(PropertyLoadSaver).Load(pm)
|
| },
|
| setKey: func(slot reflect.Value, k *Key) {
|
| - setKey(slot.Addr().Interface(), k)
|
| + PopulateKey(slot.Addr().Interface(), k)
|
| },
|
| }
|
| if et.Kind() == reflect.Map {
|
| @@ -136,7 +136,7 @@ func multiArgTypePLSPtr(et reflect.Type) multiArgType {
|
| return slot.Interface().(PropertyLoadSaver).Load(pm)
|
| },
|
| setKey: func(slot reflect.Value, k *Key) {
|
| - setKey(slot.Interface(), k)
|
| + PopulateKey(slot.Interface(), k)
|
| },
|
| }
|
| if et.Kind() == reflect.Map {
|
| @@ -174,7 +174,7 @@ func multiArgTypeStruct(et reflect.Type) multiArgType {
|
| return toPLS(slot).Load(pm)
|
| },
|
| setKey: func(slot reflect.Value, k *Key) {
|
| - setKey(toPLS(slot), k)
|
| + PopulateKey(toPLS(slot), k)
|
| },
|
| newElem: func() reflect.Value {
|
| return reflect.New(et).Elem()
|
| @@ -205,7 +205,7 @@ func multiArgTypeStructPtr(et reflect.Type) multiArgType {
|
| return toPLS(slot).Load(pm)
|
| },
|
| setKey: func(slot reflect.Value, k *Key) {
|
| - setKey(toPLS(slot), k)
|
| + PopulateKey(toPLS(slot), k)
|
| },
|
| newElem: func() reflect.Value {
|
| return reflect.New(et)
|
| @@ -229,7 +229,7 @@ func multiArgTypeInterface() multiArgType {
|
| return mkPLS(slot.Elem().Interface()).Load(pm)
|
| },
|
| setKey: func(slot reflect.Value, k *Key) {
|
| - setKey(slot.Elem().Interface(), k)
|
| + PopulateKey(slot.Elem().Interface(), k)
|
| },
|
| }
|
| }
|
| @@ -256,20 +256,6 @@ func newKeyObjErr(aid, ns string, src interface{}) (*Key, error) {
|
| return NewKey(aid, ns, kind, sid, iid, par), nil
|
| }
|
|
|
| -func setKey(src interface{}, key *Key) {
|
| - pls := getMGS(src)
|
| - if !pls.SetMeta("key", key) {
|
| - lst := key.LastTok()
|
| - if lst.StringID != "" {
|
| - pls.SetMeta("id", lst.StringID)
|
| - } else {
|
| - pls.SetMeta("id", lst.IntID)
|
| - }
|
| - pls.SetMeta("kind", lst.Kind)
|
| - pls.SetMeta("parent", key.Parent())
|
| - }
|
| -}
|
| -
|
| func mkPLS(o interface{}) PropertyLoadSaver {
|
| if pls, ok := o.(PropertyLoadSaver); ok {
|
| return pls
|
|
|