在Insert处理和Update处理时,获取Created和Updated时间的逻辑对Oracle数据库的处理不统一 #2205

Open
opened 2022-12-30 13:09:15 +00:00 by engchina · 1 comment

你好!

在Insert处理和Update处理时,获取Created和Updated时间的逻辑对Oracle数据库的处理不统一。

session_update.go中,从219行开始,有一段对Oracle数据库判断逻辑。

            if session.engine.dialect.URI().DBType == schemas.ORACLE {
				args = append(args, t)
			} else {
				args = append(args, val)
			}

session_update.go中,没有上面逻辑。

导致的问题是,第1次Insert时,获取Created和Updated时间是没有毫秒的。
然后在每次更新时,获取Updated时间包括了毫秒。

希望统一一下。

你好! 在Insert处理和Update处理时,获取Created和Updated时间的逻辑对Oracle数据库的处理不统一。 session_update.go中,从219行开始,有一段对Oracle数据库判断逻辑。 ``` if session.engine.dialect.URI().DBType == schemas.ORACLE { args = append(args, t) } else { args = append(args, val) } ``` session_update.go中,没有上面逻辑。 导致的问题是,第1次Insert时,获取Created和Updated时间是没有毫秒的。 然后在每次更新时,获取Updated时间包括了毫秒。 希望统一一下。
Author

更正一下,
(错误)session_update.go中,没有上面逻辑。
(正确)session_insert.go中,没有上面逻辑。

更正一下, (错误)session_update.go中,没有上面逻辑。 (正确)session_insert.go中,没有上面逻辑。
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#2205
No description provided.