Fix bug where generation could fail

This commit is contained in:
Aaron L 2016-09-16 08:28:05 -07:00
parent 71cda35c50
commit fbb3872303

View file

@ -4,7 +4,8 @@
{{- $table := .Table -}} {{- $table := .Table -}}
{{- range .Table.ToManyRelationships -}} {{- range .Table.ToManyRelationships -}}
{{- if (and .ForeignColumnUnique (not .ToJoinTable)) -}} {{- if (and .ForeignColumnUnique (not .ToJoinTable)) -}}
{{- template "relationship_to_one_setops_test_helper" (textsFromOneToOneRelationship $dot.PkgName $dot.Tables $table .) -}} {{- $txt := (textsFromOneToOneRelationship $dot.PkgName $dot.Tables $table .) -}}
{{- template "relationship_to_one_setops_test_helper" (preserveDot $dot $txt) -}}
{{- else -}} {{- else -}}
{{- $varNameSingular := .Table | singular | camelCase -}} {{- $varNameSingular := .Table | singular | camelCase -}}
{{- $foreignVarNameSingular := .ForeignTable | singular | camelCase -}} {{- $foreignVarNameSingular := .ForeignTable | singular | camelCase -}}