entc/gen: fix eager-loading for m2m edges (#335)

Fixed #334
This commit is contained in:
Ariel Mashraki
2020-02-08 22:26:30 +02:00
committed by GitHub
parent c8940e6a5f
commit 48d33fde9d
15 changed files with 19 additions and 19 deletions

View File

@@ -326,7 +326,7 @@ func ({{ $receiver }} *{{ $builder }}) sqlQuery() *sql.Selector {
{{- if and (not $field.UserDefined) $field.IsString -}}
strconv.FormatInt({{ $arg }}.Int64, 10)
{{- else if hasPrefix $nulltype "sql" -}}
{{ $field.NullTypeField "eout" -}}
{{ $field.NullTypeField $arg -}}
{{- else -}}
{{ $arg }}
{{- end }}