2019/11/19

gorm 问题



  • 多了许多()  query := db.debug.Where(fmt.Sprintf("id in ( %s )", “1,2,3”))=>SELECT * FROM `a`  WHERE `a`.`deleted_at` IS NULL AND ((id in ( 1,2,3 )))
  • preload 时ID一大堆