mirror of https://github.com/go-gorm/gorm.git
Remove unnecessary ToSnake
This commit is contained in:
parent
b32c5badd2
commit
b1c2a22646
|
@ -475,7 +475,7 @@ func (scope *Scope) related(value interface{}, foreignKeys ...string) *Scope {
|
|||
|
||||
// has one
|
||||
if foreignValue, err := scope.FieldValueByName(foreignKey); err == nil {
|
||||
sql := fmt.Sprintf("%v = ?", scope.Quote(ToSnake(toScope.PrimaryKey())))
|
||||
sql := fmt.Sprintf("%v = ?", scope.Quote(toScope.PrimaryKey()))
|
||||
toScope.inlineCondition(sql, foreignValue).callCallbacks(scope.db.parent.callback.queries)
|
||||
return scope
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue