Fix another occurrency of XSlice cast failures
- When eager loading, we pull the values back out of the R struct, at this point it's possible to get the "poisoned" XSlice type that nothing can deal with again.
This commit is contained in:
parent
833fd04c6b
commit
466ea1f55f
1 changed files with 3 additions and 0 deletions
|
@ -241,6 +241,9 @@ func collectLoaded(key string, loadingFrom reflect.Value) (reflect.Value, bindKi
|
||||||
if loadedType.Elem().Kind() == reflect.Struct {
|
if loadedType.Elem().Kind() == reflect.Struct {
|
||||||
bkind = kindStruct
|
bkind = kindStruct
|
||||||
loadedType = reflect.SliceOf(loadedType)
|
loadedType = reflect.SliceOf(loadedType)
|
||||||
|
} else {
|
||||||
|
// Ensure that we get rid of all the helper "XSlice" types
|
||||||
|
loadedType = reflect.SliceOf(loadedType.Elem())
|
||||||
}
|
}
|
||||||
|
|
||||||
collection := reflect.MakeSlice(loadedType, 0, 0)
|
collection := reflect.MakeSlice(loadedType, 0, 0)
|
||||||
|
|
Loading…
Reference in a new issue