gorm-Duplicate-entry
gorm insert data to mysql tips:
(Error 1062: Duplicate entry '267857' for key 'PRIMARY')
reason: use twice
//db.Create(model)
or tx.Create(model)
remove one ,then it ok ;
posted on 2018-08-13 16:17 iokde.com 阅读(1718) 评论(0) 编辑 收藏 举报