Fix GORM with Go 1.4 #892

This commit is contained in:
Jinzhu 2016-03-09 20:44:24 +08:00
parent 8de97c2883
commit bd99af5067
2 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@ func (c *Callback) clone() *Callback {
updates: c.updates,
deletes: c.deletes,
queries: c.queries,
rowQueries: c.rowQueries,
processors: c.processors,
}
}

View File

@ -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 {