gormt
gormt copied to clipboard
database to golang struct
gorm 1.x 使用 primaryKey 好像识别不出来.. 现在的版本默认都是生成的 primaryKey , AUTO_INCREMENT 不加上, 新增的时候主键id不会被复制好像.
func (m *VOffer) TableName() string { return "my_db.v_offer" } 如同上面所示。希望可以加上“my_db.”
生成的函數有錯誤
func (obj *_VGameOrderItemMgr) GetBatchFromResult(results []bool) (results []*VGameOrderItem, err error) input跟output參數名都叫results導致golang無法編譯
1.DDL 设置一个非空的字符串值作为默认值, 2.使用gormt生成的结构, 3.再去AutoMigrate建表时会出现SQL错误,原因是丢掉了default值的引号 另外: 建议SQL 每个字段的注释还是要放在gorm中,否则Migrate table的时候会丢掉注释,无法原样的重复数据库DDL,集中式DB的项目这样可能无问题,但是多版本发布的情况下,应用程序自动建库建表,就不太合适。
hi,Warning using golint,Can we follow this(golint) standard ? thanks 
panic: type (set('j','p','b','s','a','f','c','h'))
Hi @xxjwxc, Hope you are all well ! I exported the following database with gormt but when I want to automigrate structs with gorm it triggers errors related to indexes....
