Fix composite primary keys for DeleteAll

This commit is contained in:
Aaron L 2016-09-13 17:20:13 -07:00
parent 91bb5ee940
commit a86e794b61

View file

@ -134,7 +134,7 @@ func (o {{$tableNameSingular}}Slice) DeleteAll(exec boil.Executor) error {
sql := fmt.Sprintf(
"DELETE FROM {{$schemaTable}} WHERE (%s) IN (%s)",
strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, {{$varNameSingular}}PrimaryKeyColumns), "{{.LQ}},{{.RQ}}"),
strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, {{$varNameSingular}}PrimaryKeyColumns), ","),
strmangle.Placeholders(dialect.IndexPlaceholders, len(o) * len({{$varNameSingular}}PrimaryKeyColumns), 1, len({{$varNameSingular}}PrimaryKeyColumns)),
)