Fix compilation
This commit is contained in:
parent
e5d3836451
commit
675bbca667
@ -418,7 +418,7 @@ func (scope *Scope) related(value interface{}, foreignKeys ...string) *Scope {
|
||||
if relationship := fromField.Relationship; relationship != nil {
|
||||
if relationship.Kind == "many_to_many" {
|
||||
joinTableHandler := relationship.JoinTableHandler
|
||||
scope.Err(joinTableHandler.JoinWith(joinTableHandler, toScope.db, scope.Value).Find(value).Error)
|
||||
scope.Err(joinTableHandler.JoinWith(toScope.db, scope.Value).Find(value).Error)
|
||||
} else if relationship.Kind == "belongs_to" {
|
||||
sql := fmt.Sprintf("%v = ?", scope.Quote(toScope.PrimaryKey()))
|
||||
foreignKeyValue := fromFields[relationship.ForeignDBName].Field.Interface()
|
||||
|
Loading…
x
Reference in New Issue
Block a user