Closed almarto closed 6 years ago
@almarto that looks good, can you update the README file with the new configuration parameter name ?
@notzippy it's already there. I added the new parameter to both files:
Your right, I was looking for more of an explanation on what singulartable
means but even gorms godoc isn't clear on that.
Perhaps if you added something in the doc like the following
By default all tables are created based on a struct are pluralized ie a type User struct {}
becomes table users
in the database, by setting this to true, User
's default table name will be user
. Note table names set with TableName
won't be affected by this setting. You can also change the created table names by setting gorm.DefaultTableNameHandler
on AppStartup
or func init()
see here for more details
Sorry for that @notzippy I didn't explain the attribute because the others aren't explained and I thought it was intended for address the user to the gorm documentation.
EDIT: I pushed the changes with better documentation and I've also squashed the commits. Please let me know if you need anything else before this PR can be merged.
Thanks looks much better - I am trying to improve the documents with every commit - thanks for your help. I changed the base to development which when merged should be out in the beginning of Febuary
I want to resolve #64 with this PR.