add quote within the table name (#1285)

This commit is contained in:
StarUDream 2019-05-06 16:23:39 +08:00 committed by BetaCat
parent ce804aee6c
commit 6a1dd59737
1 changed files with 2 additions and 0 deletions

View File

@ -34,6 +34,8 @@ func (session *Session) Exist(bean ...interface{}) (bool, error) {
return false, ErrTableNotFound
}
tableName = session.statement.Engine.Quote(tableName)
if session.statement.cond.IsValid() {
condSQL, condArgs, err := builder.ToSQL(session.statement.cond)
if err != nil {