Auto Increment doesn't work properly in Oracle #1039

Open
opened 2018-07-16 17:56:21 +00:00 by rofly · 4 comments
rofly commented 2018-07-16 17:56:21 +00:00 (Migrated from github.com)

When a field has the tag "autoincr", in the insert process Xorm will always try to select the next value for the sequence from a fixed sequence, named:

https://github.com/go-xorm/xorm/blob/master/session_insert.go#L386

Instead of having an option to specify the sequence name that the value should be extracted from.

When a field has the tag "autoincr", in the insert process Xorm will always try to select the next value for the sequence from a fixed sequence, named: https://github.com/go-xorm/xorm/blob/master/session_insert.go#L386 Instead of having an option to specify the sequence name that the value should be extracted from.

Please feel free to send a PR.

Please feel free to send a PR.
yixin19 commented 2019-01-29 23:40:37 +00:00 (Migrated from github.com)

Did someone fix this issue?
I have the same problem.
ORA-01036: illegal variable name/number

Did someone fix this issue? I have the same problem. ORA-01036: illegal variable name/number
rofly commented 2019-02-02 13:03:27 +00:00 (Migrated from github.com)

I started building the code for autoincrement back in 2018, but the project i was working on was canceled and I'm no longer working with Go + Oracle.

I can take a look in the code on monday and reply here.

I started building the code for autoincrement back in 2018, but the project i was working on was canceled and I'm no longer working with Go + Oracle. I can take a look in the code on monday and reply here.
yixin19 commented 2019-02-02 14:38:03 +00:00 (Migrated from github.com)

I started building the code for autoincrement back in 2018, but the project i was working on was canceled and I'm no longer working with Go + Oracle.

I can take a look in the code on monday and reply here.

I will appreciate it if you have the code

> I started building the code for autoincrement back in 2018, but the project i was working on was canceled and I'm no longer working with Go + Oracle. > > I can take a look in the code on monday and reply here. I will appreciate it if you have the code
lunny added the
kind
bug
label 2020-03-03 12:54:33 +00:00
lunny added this to the 1.1.1 milestone 2020-03-03 12:54:36 +00:00
lunny added the
db
oracle
label 2021-06-06 13:16:45 +00:00
lunny modified the milestone from 1.1.1 to 1.3.0 2021-06-07 05:54:18 +00:00
lunny modified the milestone from 1.3.0 to 2.0.0 2022-01-25 04:00:47 +00:00
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#1039
No description provided.