[PR #281] [CLOSED] fix:fix gorm id specified twice when use mysql,make field.HasDefaultV… #421

Closed
opened 2026-02-16 01:15:55 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/281
Author: @rouxiaomin
Created: 5/12/2025
Status: Closed

Base: mainHead: fix_mysql_id_specified_twice


📝 Commits (1)

  • 9b0eb2b fix:fix gorm id specified twice when use mysql,make field.HasDefaultValue=true

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 internal/db/mysql/dialector.go (+2 -1)

📄 Description

When use mysql,Column 'id' specified twice when generate the sql

Failed to insert into MySQL, referred to this Gorm issue https://github.com/go-gorm/gorm/issues/5893 and fix the error.
image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/281 **Author:** [@rouxiaomin](https://github.com/rouxiaomin) **Created:** 5/12/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix_mysql_id_specified_twice` --- ### 📝 Commits (1) - [`9b0eb2b`](https://github.com/langgenius/dify-plugin-daemon/commit/9b0eb2bff731494ef9e42001fbb5513ad452d007) fix:fix gorm id specified twice when use mysql,make field.HasDefaultValue=true ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `internal/db/mysql/dialector.go` (+2 -1) </details> ### 📄 Description When use mysql,Column 'id' specified twice when generate the sql Failed to insert into MySQL, referred to this Gorm issue `https://github.com/go-gorm/gorm/issues/5893` and fix the error. ![image](https://github.com/user-attachments/assets/05c3ec25-1c72-407f-88cc-1db7ad9a48f0) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:15:55 -05:00
yindo closed this issue 2026-02-16 01:15:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#421