Remove duplicates from insert whitelist
This commit is contained in:
parent
1c7ad18ab1
commit
a073752df2
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ func (o *{{$tableNameSingular}}) generateInsertColumns(whitelist ...string) ([]s
|
|||
|
||||
wl = append(wl, {{$varNameSingular}}ColumnsWithoutDefault...)
|
||||
|
||||
wl = append(boil.NonZeroDefaultSet({{$varNameSingular}}ColumnsWithDefault, o), wl...)
|
||||
wl = boil.SetMerge(boil.NonZeroDefaultSet({{$varNameSingular}}ColumnsWithDefault, o), wl)
|
||||
wl = boil.SortByKeys({{$varNameSingular}}Columns, wl)
|
||||
|
||||
// Only return the columns with default values that are not in the insert whitelist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue