Closed almarto closed 6 years ago
A good place to set that would be in the
revel.AppStart(func(){
gorm.DB.SingularTable(true)
})
But configurable is fine as well
Yes @notzippy, it would be a good place but if use that code there, people who don't want/need to use SingularTable will have to use DB.SingularTable(false) within every function in their controllers.
Could you @notzippy please check the PR #66? I guess that would be a good solution to add for the next release.
Merged in develop
I'm using DB.SingularTable(true) but I have to use this code within every function of my controllers. I didn't find a general place to set this value and I'd expect it to be configurable using the app.conf file.
Would it be possible to add a new configuration attribute? e.g. 'db.singulartable', so there is a general and unique place where this can be configured.