From bd99af50677e04f8d3f89c99a06c9661646b1503 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Wed, 9 Mar 2016 20:44:24 +0800 Subject: [PATCH] Fix GORM with Go 1.4 #892 --- callback.go | 1 + utils.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/callback.go b/callback.go index 84526236..93198a71 100644 --- a/callback.go +++ b/callback.go @@ -41,6 +41,7 @@ func (c *Callback) clone() *Callback { updates: c.updates, deletes: c.deletes, queries: c.queries, + rowQueries: c.rowQueries, processors: c.processors, } } diff --git a/utils.go b/utils.go index 8ac4fa7d..dc69e804 100644 --- a/utils.go +++ b/utils.go @@ -81,7 +81,7 @@ func ToDBName(name string) string { ) for i, v := range value[:len(value)-1] { - nextCase = value[i+1] >= 'A' && value[i+1] <= 'Z' + nextCase = strCase(value[i+1] >= 'A' && value[i+1] <= 'Z') if i > 0 { if currCase == upper { if lastCase == upper && nextCase == upper {