mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
Update contrib/drivers/pgsql/pgsql_do_insert.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@ -59,7 +59,7 @@ func (d *Driver) DoInsert(
|
||||
tableFields, err := d.GetCore().GetDB().TableFields(ctx, table)
|
||||
if err == nil {
|
||||
for _, field := range tableFields {
|
||||
if gstr.Equal(field.Key, "PRI") {
|
||||
if gstr.Equal(field.Key, "pri") {
|
||||
pkField := *field
|
||||
ctx = context.WithValue(ctx, internalPrimaryKeyInCtx, pkField)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user