VOL-1255: Fixed an issue with the proxy implementation
- Had to change the model slightly to mimic a polymorphic behaviour
Change-Id: I12017cdfedf5c0ed05243245aa2a811556222e0f
diff --git a/db/model/child_type.go b/db/model/child_type.go
index 13b0245..de2fad7 100644
--- a/db/model/child_type.go
+++ b/db/model/child_type.go
@@ -88,15 +88,24 @@
return s
}
case "int32":
- fallthrough
+ keyFromStr = func(s string) interface{} {
+ i, _ := strconv.Atoi(s)
+ return int32(i)
+ }
case "int64":
- fallthrough
+ keyFromStr = func(s string) interface{} {
+ i, _ := strconv.Atoi(s)
+ return int64(i)
+ }
case "uint32":
- fallthrough
+ keyFromStr = func(s string) interface{} {
+ i, _ := strconv.Atoi(s)
+ return uint32(i)
+ }
case "uint64":
keyFromStr = func(s string) interface{} {
i, _ := strconv.Atoi(s)
- return i
+ return uint64(i)
}
default:
fmt.Errorf("Key type not implemented - type: %s\n", keyType.(reflect.Type))