go-gorm / clickhouse

GORM clickhouse driver
MIT License
244 stars 72 forks source link

神奇的字段,id,当我使用id作为字段名时,会出现在INSERT INTO时,两次赋值,导致message: Column id specified more than once #145

Open steden opened 8 months ago

steden commented 8 months ago
image image
2024/01/01 11:31:24 /src/farseer-go/data/tableSet.go:325 code: 15, message: Column id specified more than once
[0.958ms] [rows:0] INSERT INTO `log_data` (`id`,`create_at`,`log_level`,`component`,`content`,`trace_id`,`app_id`,`app_name`,`app_ip`,`id`) VALUES (265673404566245376,'2024-01-01 11:31:23','2','','同步数据库:1/1,task:263267062471217160',265673404574633984,265590868014043136,'FSchedule','10.100.0.88',265673404566245376)

以上,如果我将id换成了log_id,则一切正常