We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d28725 commit c161049Copy full SHA for c161049
hasura/hasura.go
@@ -213,12 +213,12 @@ func getColumns(typ reflect.Type) []string {
213
if !strings.HasPrefix(tag, "-") {
214
columns = append(columns, strcase.ToSnake(field.Name))
215
}
216
- }
217
-
218
- if tag := field.Tag.Get("pg"); tag != "" {
+ } else if tag := field.Tag.Get("pg"); tag != "" {
219
if !strings.HasPrefix(tag, "-") && field.Name != "tableName" {
220
221
+ } else {
+ columns = append(columns, strcase.ToSnake(field.Name))
222
223
} else {
224
cols := getColumns(field.Type)
0 commit comments