Is it possible to get model's table name? I see that it's possible to get it from ModelStruct but I don't know how to do it correctly. I didn't find any initializations for this structure.
user := User{}
tableName := db...
Is it possible to get model's table name? I see that it's possible to get it from ModelStruct but I don't know how to do it correctly. I didn't find any initializations for this structure.
user := User{}
tableName := db...
Like this:
tableName := db.NewScope(model).GetModelStruct().TableName(db)