ORA-01843: Not a Valid Month in go xorm 1.0.1 #1641
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1641
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We are using go xorm with
Oracle 12c
. We are using libraryversion 0.6.1
and trying to upgrade toversion 1.0.1
.We notice timestamp format has changed in
version 1.0.1
and Oracle throws errorORA-01843: Not a Valid Month
due to invalid timestamp format.Go field type - time.Time
xorm:""
Oracle column type - TIMESTAMP(6)
We set engine.ShowSQL(true) and notice timestamp format has changed in SQL -
version 0.6.1 -
2020-04-01 14:50:31.638518 +0530 IST m=+8.824813982
version 1.0.1 -
2020-04-01T14:31:35
We tried using below xorm types but Oracle throws error
ORA-01843: Not a Valid Month
for all.time.Time
xorm:""
-2020-04-01T14:31:35
time.Time
xorm:"TIMESTAMP"
-2020-04-01T14:31:35
time.Time
xorm:"TIMESTAMPZ"
-2020-04-01T14:31:35.313203+05:30
I have the same issue. Can someone let me know how to fix it.
@anshulagg2705 and @dwa3092 which version are you using? And could you help to confirm #1463 fixed your problem?
it works fine for inserting ,but not for updating.
UPDATE T_API_KEY SET status = :1, update_time = :2 WHERE key_id=:3 [1 2020-05-26 17:44:55 b04f4396-0883-43d0-9d9f-61318910810e]
I found the issue: session_update.go line 208 should be modified:
if session.engine.dialect.URI().DBType == schemas.ORACLE { args = append(args, t) } else { args = append(args, val) }
@getsu Please send a PR to fix that.
@lunny #1694