| Index: service/datastore/pls.go
|
| diff --git a/service/datastore/pls.go b/service/datastore/pls.go
|
| index e3bb3194fb8a8d57a85f045c4c125a02c9d21306..a323112f3b01602ea81cecbb0f65418765b29745 100644
|
| --- a/service/datastore/pls.go
|
| +++ b/service/datastore/pls.go
|
| @@ -93,7 +93,10 @@ import (
|
| // methods. So if your GetMeta handles "kind", but you explicitly have a
|
| // $kind field, the $kind field will take precedence and your GetMeta
|
| // implementation will not be called for "kind".
|
| -func GetPLS(obj interface{}) PropertyLoadSaver {
|
| +func GetPLS(obj interface{}) interface {
|
| + PropertyLoadSaver
|
| + MetaGetterSetter
|
| +} {
|
| v := reflect.ValueOf(obj)
|
| if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct {
|
| return &structPLS{c: &structCodec{problem: ErrInvalidEntityType}}
|
| @@ -106,6 +109,13 @@ func GetPLS(obj interface{}) PropertyLoadSaver {
|
| return &structPLS{v, c}
|
| }
|
|
|
| +func getMGS(obj interface{}) MetaGetterSetter {
|
| + if mgs, ok := obj.(MetaGetterSetter); ok {
|
| + return mgs
|
| + }
|
| + return GetPLS(obj)
|
| +}
|
| +
|
| func getCodec(structType reflect.Type) *structCodec {
|
| structCodecsMutex.RLock()
|
| c, ok := structCodecs[structType]
|
|
|