unsupported data
error with nested joins/preloads
#6956
Labels
type:with reproduction steps
with reproduction steps
unsupported data
error with nested joins/preloads
#6956
GORM Playground Link
go-gorm/playground#715
Description
In our project we have deeply nested data that needs to be joined and some additional values preloaded.
In a previous version of gorm (1.25.5) this was working.
Now we get a
unsupported data
error stemming fromgorm/callbacks/preload.go#L140
The issue seems to be introduced in #6877.
The value of
db.Statement.ReflectValue.Kind().String()
isptr
.My best guess is that preloads of sub-structs of optional nested structs/joins are the problem.
If I duplicate the whole
case reflect.Struct:
case (ingorm/callbacks/preload.go#L133
) as an additionalcase reflect.Pointer:
case, our code works again.The text was updated successfully, but these errors were encountered: