Can't have different pg table names for the same Go struct
hsluoyz opened this issue · 7 comments
hsluoyz commented
See details at: casbin/casbin-pg-adapter#26
kilosonc commented
In docs I found dynamic table name, but when I use it in my project, there's always an error pgadapter.NewAdapter: ERROR #42601 syntax error at or near "("
func (a *Adapter) createTableifNotExists() error {
err := a.db.Model((*CasbinRule)(nil)).Table(a.tableName).CreateTable( &orm.CreateTableOptions{
Temp: false,
IfNotExists: true,
})
if err != nil {
return err
}
return nil
}
hsluoyz commented
@closetool can you provide a full example code, maybe a github repo?
arafat-java commented
Guys, Any tentative timelines for fixing this
hsluoyz commented
arafat-java commented
Guys, any update ?
vmihailenco commented
Closing as duplicate of #1810