fix invalid date when update for oracle (#1694)

Merge branch 'master' into master

Merge branch 'master' into master

Merge branch 'master' into master

fix invalid date when update for oracle

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: chendy <dengyue.chen@ebaotech.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1694
This commit is contained in:
getsu 2020-07-03 08:10:09 +00:00 committed by Lunny Xiao
parent 9b41b879a7
commit 677c0d7411
1 changed files with 5 additions and 1 deletions

View File

@ -206,7 +206,11 @@ func (session *Session) Update(bean interface{}, condiBean ...interface{}) (int6
colNames = append(colNames, session.engine.Quote(table.Updated)+" = ?")
col := table.UpdatedColumn()
val, t := session.engine.nowTime(col)
args = append(args, val)
if session.engine.dialect.URI().DBType == schemas.ORACLE {
args = append(args, t)
} else {
args = append(args, val)
}
var colName = col.Name
if isStruct {