Fix postgres placeholders for to-many.RemoveX

- Help fix #97
This commit is contained in:
Aaron L 2017-01-24 18:57:45 -08:00
parent e992e327c2
commit c33bb479a1

View file

@ -250,7 +250,7 @@ func (o *{{$txt.LocalTable.NameGo}}) Remove{{$txt.Function.Name}}(exec boil.Exec
{{if .ToJoinTable -}}
query := fmt.Sprintf(
"delete from {{.JoinTable | $dot.SchemaTable}} where {{.JoinLocalColumn | $dot.Quotes}} = {{if $dot.Dialect.IndexPlaceholders}}$1{{else}}?{{end}} and {{.JoinForeignColumn | $dot.Quotes}} in (%s)",
strmangle.Placeholders(dialect.IndexPlaceholders, len(related), 1, 1),
strmangle.Placeholders(dialect.IndexPlaceholders, len(related), 2, 1),
)
values := []interface{}{{"{"}}o.{{$txt.LocalTable.ColumnNameGo}}}