We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9131e3 commit 7ebb320Copy full SHA for 7ebb320
callbacks/preload.go
@@ -49,7 +49,7 @@ func preload(db *gorm.DB, rels []*schema.Relationship, conds []interface{}) {
49
}
50
51
joinResults := rel.JoinTable.MakeSlice().Elem()
52
- column, values := schema.ToQueryValues(rel.JoinTable.Table, joinForeignKeys, joinForeignValues)
+ column, values := schema.ToQueryValues(clause.CurrentTable, joinForeignKeys, joinForeignValues)
53
db.AddError(tx.Where(clause.IN{Column: column, Values: values}).Find(joinResults.Addr().Interface()).Error)
54
55
// convert join identity map to relation identity map
0 commit comments