fix: unsupported data
on nested joins with preloads
This commit is contained in:
parent
1e13fd7543
commit
2aeabe29e3
@ -130,7 +130,7 @@ func preloadEntryPoint(db *gorm.DB, joins []string, relationships *schema.Relati
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case reflect.Struct:
|
case reflect.Struct, reflect.Pointer:
|
||||||
reflectValue := rel.Field.ReflectValueOf(db.Statement.Context, rv)
|
reflectValue := rel.Field.ReflectValueOf(db.Statement.Context, rv)
|
||||||
tx := preloadDB(db, reflectValue, reflectValue.Interface())
|
tx := preloadDB(db, reflectValue, reflectValue.Interface())
|
||||||
if err := preloadEntryPoint(tx, nestedJoins, &tx.Statement.Schema.Relationships, preloadMap[name], associationsConds); err != nil {
|
if err := preloadEntryPoint(tx, nestedJoins, &tx.Statement.Schema.Relationships, preloadMap[name], associationsConds); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user