Use MustTx
This commit is contained in:
parent
c57b3ea3b7
commit
e6b8cfff93
2 changed files with 3 additions and 8 deletions
|
@ -5,10 +5,8 @@
|
|||
{{- range toManyRelationships .Table.Name .Tables -}}
|
||||
{{- $rel := textsFromRelationship $dot.Tables $table . -}}
|
||||
func Test{{$rel.LocalTable.NameGo}}ToMany{{$rel.Function.Name}}(t *testing.T) {
|
||||
tx, err := boil.Begin()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var err error
|
||||
tx := MustTx(boil.Begin())
|
||||
defer tx.Rollback()
|
||||
|
||||
var a {{$rel.LocalTable.NameGo}}
|
||||
|
|
|
@ -4,10 +4,7 @@
|
|||
{{- range .Table.FKeys -}}
|
||||
{{- $rel := textsFromForeignKey $dot.Tables $dot.Table . -}}
|
||||
func Test{{$rel.LocalTable.NameGo}}ToOne{{$rel.ForeignTable.NameGo}}_{{$rel.LocalTable.ColumnNameGo}}(t *testing.T) {
|
||||
tx, err := boil.Begin()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
tx := MustTx(boil.Begin())
|
||||
defer tx.Rollback()
|
||||
|
||||
var foreign {{$rel.ForeignTable.NameGo}}
|
||||
|
|
Loading…
Add table
Reference in a new issue