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 ;

相关文章:

  • 2021-11-21
  • 2021-12-17
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-04-05
猜你喜欢
  • 2021-04-16
  • 2022-12-23
  • 2022-02-06
  • 2021-07-22
  • 2021-04-29
  • 2021-10-16
相关资源
相似解决方案