Skip to content

Commit

Permalink
Fix generateDeleteSetHandler func not to override the primary key nam…
Browse files Browse the repository at this point in the history
…e with the column name (#210)
  • Loading branch information
emilev-ms authored Jul 12, 2021
1 parent 44a15d9 commit 1b8e344
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions plugin/handlergen.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,6 @@ func (p *OrmPlugin) generateDeleteSetHandler(message *generator.Descriptor) {
p.P(`var err error`)
ormable := p.getOrmable(typeName)
pkName, pk := p.findPrimaryKey(ormable)
column := pk.GetTag().GetColumn()
if len(column) != 0 {
pkName = column
}
p.P(`keys := []`, pk.Type, `{}`)
p.P(`for _, obj := range in {`)
p.P(`ormObj, err := obj.ToORM(ctx)`)
Expand Down

0 comments on commit 1b8e344

Please sign in to comment.