Fix a bug that could occur on no-field inserts
This commit is contained in:
parent
d13410617f
commit
10cfe74989
1 changed files with 5 additions and 2 deletions
|
@ -86,10 +86,13 @@ func (o *{{$tableNameSingular}}) Insert(exec boil.Executor, whitelist ... string
|
|||
{{else -}}
|
||||
queryOutput = fmt.Sprintf("OUTPUT INSERTED.{{.LQ}}%s{{.RQ}} ", strings.Join(returnColumns, "{{.RQ}},INSERTED.{{.LQ}}"))
|
||||
{{end -}}
|
||||
{{- end}}
|
||||
{{end -}}
|
||||
}
|
||||
|
||||
if len(wl) != 0 {
|
||||
cache.query = fmt.Sprintf(cache.query, queryOutput, queryReturning)
|
||||
}
|
||||
}
|
||||
|
||||
value := reflect.Indirect(reflect.ValueOf(o))
|
||||
vals := queries.ValuesFromMapping(value, cache.valueMapping)
|
||||
|
|
Loading…
Reference in a new issue