From 1045aa020f6ad8a445bdb748d088bccc1fdc58f1 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 6 Mar 2016 23:22:26 +0800 Subject: [PATCH] remove unneccessary warning on sync --- session.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/session.go b/session.go index 10a8f81f..565635bf 100644 --- a/session.go +++ b/session.go @@ -4097,8 +4097,10 @@ func (s *Session) Sync2(beans ...interface{}) error { } } } else { - engine.LogWarnf("Table %s column %s db type is %s, struct type is %s", - table.Name, col.Name, curType, expectedType) + if !(strings.HasPrefix(curType, expectedType) && curType[len(expectedType)] == '(') { + engine.LogWarnf("Table %s column %s db type is %s, struct type is %s", + table.Name, col.Name, curType, expectedType) + } } } else if expectedType == core.Varchar { if engine.dialect.DBType() == core.MYSQL {