From 9402c8fe07642334e1f361b9765d2d8cdc8d05f1 Mon Sep 17 00:00:00 2001 From: Aaron L Date: Thu, 22 Sep 2016 00:09:07 -0700 Subject: [PATCH] Fix area where the wrong columns were being used --- templates_test/relationship_to_many.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates_test/relationship_to_many.tpl b/templates_test/relationship_to_many.tpl index c779352..d23984e 100644 --- a/templates_test/relationship_to_many.tpl +++ b/templates_test/relationship_to_many.tpl @@ -23,8 +23,8 @@ func test{{$txt.LocalTable.NameGo}}ToMany{{$txt.Function.Name}}(t *testing.T) { t.Fatal(err) } - randomize.Struct(seed, &b, {{$foreignVarNameSingular}}DBTypes, false{{if not $txt.Function.UsesBytes}}, "{{.ForeignColumn}}"{{end}}) - randomize.Struct(seed, &c, {{$foreignVarNameSingular}}DBTypes, false{{if not $txt.Function.UsesBytes}}, "{{.ForeignColumn}}"{{end}}) + randomize.Struct(seed, &b, {{$foreignVarNameSingular}}DBTypes, false, {{$foreignVarNameSingular}}ColumnsWithDefault...) + randomize.Struct(seed, &c, {{$foreignVarNameSingular}}DBTypes, false, {{$foreignVarNameSingular}}ColumnsWithDefault...) {{if .Nullable -}} a.{{.Column | titleCase}}.Valid = true {{- end}}