Xorm cannot augment itself by using Sqlite3 to drive the primary key.

the environment I use is

go version go1.11.1 windows/amd64
xorm + Sqlite3 

I am using

type User struct {
Id      int       `json:"id" xorm:"pk autoincr unique(UNIQUE) INT(10) notnull"`
Name    string    `json:"name" xorm:"VARCHAR(50) notnull"`
}

user := new(User)
user.Name = "myname"
affected, err := engine.Insert(user)

prompt me when inserting data

NOT NULL constraint failed: user.id

I have a competitive autoincr field written above
I"m stuck here
is there a god who would like to take a look at it for me?
wait online, thank you!

Dec.28,2021

you are not like me. You should not have set that field to self-increasing

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45215-437c8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45215-437c8.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?