go-gorm / gorm

The fantastic ORM library for Golang, aims to be developer friendly
https://gorm.io
MIT License
36.86k stars 3.93k forks source link

pq: Could not complete operation in a failed transaction #1545

Closed abcd3652460 closed 6 years ago

abcd3652460 commented 7 years ago

(C:/Users/laptop/Documents/myGo/src/mxc/lottery/data/operation_data.go:226) [2017-07-26 12:36:23] [1.50ms] INSERT INTO "SSCOpenNum" ("Typ","Date","Count","Num10","Num9","Num8","Num7","Num6","Wan","Qian","Bai","Shi","Ge","CreateDate") VALUES ('1','20170721','2','-1','-1','-1','-1','-1','-1','-1','-1','-1','-1','2017-07-26 12:36:23') RETURNING "SSCOpenNum"."ID"
[1 rows affected or returned ]

(C:/Users/laptop/Documents/myGo/src/mxc/lottery/data/operation_data.go:226) [2017-07-26 12:36:23] pq: 字段 "id" 不存在

pq: Could not complete operation in a failed transaction

这个是什么问题?我的别一个表可以的。。。

jinzhu commented 6 years ago

ID column doesn't exist?