tag autoincr is not working #1063

Closed
opened 2018-08-08 10:36:15 +00:00 by liontail · 2 comments
liontail commented 2018-08-08 10:36:15 +00:00 (Migrated from github.com)
type Task struct {
	TaskID      int64  `xorm:"pk autoincr 'id'"`
	Description string `xorm:"description"`
}
engine.ShowSQL(true)
if err := engine.Sync(new(Task)); err != nil {
		log.Fatal(err)
}

and I got query log like this

CREATE TABLE "task" ("id" NUMBER NOT NULL, "description" VARCHAR2(255) NULL, PRIMARY KEY ( "id" ))

I don't know how to fix this ( i use xorm with oracle and use "gopkg.in/goracle.v2" for the driver)

``` type Task struct { TaskID int64 `xorm:"pk autoincr 'id'"` Description string `xorm:"description"` } engine.ShowSQL(true) if err := engine.Sync(new(Task)); err != nil { log.Fatal(err) } ``` and I got query log like this ```CREATE TABLE "task" ("id" NUMBER NOT NULL, "description" VARCHAR2(255) NULL, PRIMARY KEY ( "id" ))``` I don't know how to fix this ( i use xorm with oracle and use "gopkg.in/goracle.v2" for the driver)

It's a bug with goracle driver I think.

It's a bug with goracle driver I think.
lunny added this to the 1.1.1 milestone 2020-03-03 12:53:32 +00:00

duplicated with #1039

duplicated with #1039
lunny closed this issue 2020-03-03 12:54:20 +00:00
lunny removed this from the 1.1.1 milestone 2020-03-03 12:54:25 +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#1063
No description provided.