解决方法:定义 type 时指明自增
type RelDisplacementHint struct {
Id int `json:"id" xorm:"pk autoincr 'id'"`
CollectionId int `json:"collection_id" xorm:"'collection_id'"`
Translation string `json:"translation" xorm:"'translation'"`
Hint string `json:"hint" xorm:"'hint'"`
}