diff --git a/table_and_query.go b/table_and_query.go index 955a25e1..a456f540 100644 --- a/table_and_query.go +++ b/table_and_query.go @@ -1,6 +1,7 @@ package gorm import ( + "fmt" "strings" ) @@ -10,9 +11,7 @@ func (scope Scope) TableAndQuery() (string, string) { //qs := LogFormatter("sql", "q", time.Duration(1), scope.SQL, scope.SQLVars, int64(1)) //t, q := scope.TableName(), qs[3].(string) - if scope.SQL == "" { - scope.prepareQuerySQL() - } + fmt.Println("#####", scope.SQL) t, q := scope.TableName(), scope.SQL if t == "" { qsplit := strings.Fields(strings.ToLower(q))