From 1b8e34400df6f6ddcd979d9a5ff567a17f221e2a Mon Sep 17 00:00:00 2001 From: Evgeny Milev Date: Mon, 12 Jul 2021 22:04:32 +0300 Subject: [PATCH] Fix generateDeleteSetHandler func not to override the primary key name with the column name (#210) --- plugin/handlergen.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugin/handlergen.go b/plugin/handlergen.go index 0400fc74..2f439a6d 100644 --- a/plugin/handlergen.go +++ b/plugin/handlergen.go @@ -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)`)