Fix #43 in a slightly different way.

This commit is contained in:
Aaron L 2016-09-20 21:22:35 -07:00
parent 79a228e297
commit cbb7041748

View file

@ -90,8 +90,8 @@ func (o *{{$tableNameSingular}}) Upsert(exec boil.Executor, {{if ne .DriverName
} }
{{if ne .DriverName "mysql" -}} {{if ne .DriverName "mysql" -}}
var conflict []string conflict := conflictColumns
if len(conflictColumns) == 0 { if len(conflict) == 0 {
conflict = make([]string, len({{$varNameSingular}}PrimaryKeyColumns)) conflict = make([]string, len({{$varNameSingular}}PrimaryKeyColumns))
copy(conflict, {{$varNameSingular}}PrimaryKeyColumns) copy(conflict, {{$varNameSingular}}PrimaryKeyColumns)
} }