From b1c2a22646d5815c911b522676fb26f9e9c44525 Mon Sep 17 00:00:00 2001
From: Jinzhu <wosmvp@gmail.com>
Date: Wed, 12 Nov 2014 10:23:51 +0800
Subject: [PATCH] Remove unnecessary ToSnake

---
 scope_private.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scope_private.go b/scope_private.go
index b6468721..debea2b7 100644
--- a/scope_private.go
+++ b/scope_private.go
@@ -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
 				}