Skip to content

Commit a84ea20

Browse files
authored
Merge pull request #1446 from benevolent0505/fix-insert-whitelist-test
Fix InsertWhitelist test in composite primary key table
2 parents ea56d78 + 7a71858 commit a84ea20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/test/insert.go.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func test{{$alias.UpPlural}}InsertWhitelist(t *testing.T) {
3939
{{if not .NoContext}}ctx := context.Background(){{end}}
4040
tx := MustTx({{if .NoContext}}boil.Begin(){{else}}boil.BeginTx(ctx, nil){{end}})
4141
defer func() { _ = tx.Rollback() }()
42-
if err = o.Insert({{if not .NoContext}}ctx, {{end -}} tx, boil.Whitelist({{$alias.DownSingular}}ColumnsWithoutDefault...)); err != nil {
42+
if err = o.Insert({{if not .NoContext}}ctx, {{end -}} tx, boil.Whitelist(strmangle.SetMerge({{$alias.DownSingular}}PrimaryKeyColumns, {{$alias.DownSingular}}ColumnsWithoutDefault)...)); err != nil {
4343
t.Error(err)
4444
}
4545

0 commit comments

Comments
 (0)