v8 cann't create or insert by dynamic table name
zsr228 opened this issue · 1 comments
zsr228 commented
version: github.com/go-pg/pg v8.0.7+incompatible
err := db.Model(&model{}).Table("model_0006").CreateTable(nil)
if nil != err {
fmt.Println(err.Error())
return err
}
I want to create model_0006, but the return is "model" created
when I create "model_0006" by manual
res, err := db.Model(&model{}).Table("model_0006").Insert(val)
if nil != err {
fmt.Println(`insert error:`, err.Error())
return err
}
no data insert
vmihailenco commented
This is a known limitation - see #1810