entc/gen: fix niladic predicates for id fields (#940)

This commit is contained in:
Ariel Mashraki
2020-11-11 09:40:29 +02:00
committed by GitHub
parent 534dbbe590
commit 4af9a331ae
2 changed files with 3 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ in the LICENSE file in the root directory of this source tree.
v[i] = {{ $arg }}[i]
}
{{- end }}
s.Where(sql.{{ call $storage.OpCode $op }}(s.C({{ $.ID.Constant }}), {{ if $op.Variadic }}v...{{ else }}id{{ end }}))
s.Where(sql.{{ call $storage.OpCode $op }}(s.C({{ $.ID.Constant }}){{ if not $op.Niladic }},{{ if $op.Variadic }}v...{{ else }}id{{ end }}{{ end }}))
}
{{- end }}