Title: [Bug] 唯一验证时批量新增,只有最后一条数据入库成功 · Issue #865 · APIJSON/APIJSON · GitHub
Open Graph Title: [Bug] 唯一验证时批量新增,只有最后一条数据入库成功 · Issue #865 · APIJSON/APIJSON
X Title: [Bug] 唯一验证时批量新增,只有最后一条数据入库成功 · Issue #865 · APIJSON/APIJSON
Description: APIJSON Version/APIJSON 版本号 8.1.8 Database Type & Version/数据库类型及版本号 MySql 8.0.32 Environment/环境信息 - JDK/基础库: jdk17 - OS/系统: windows APIAuto Screenshots/APIAuto 请求与结果完整截屏 在添加唯一验证的情况下批量新增,只有最后一条数据入库成功 Current Behavior/问题描述 在添加唯一验证的情况下批量新增,...
Open Graph Description: APIJSON Version/APIJSON 版本号 8.1.8 Database Type & Version/数据库类型及版本号 MySql 8.0.32 Environment/环境信息 - JDK/基础库: jdk17 - OS/系统: windows APIAuto Screenshots/APIAuto 请求与结果完整截屏 在添加唯一验证的情况下批量新增,只有最后一条数据入库成...
X Description: APIJSON Version/APIJSON 版本号 8.1.8 Database Type & Version/数据库类型及版本号 MySql 8.0.32 Environment/环境信息 - JDK/基础库: jdk17 - OS/系统: windows APIAuto Screenshots/APIAuto 请求与结果完整截屏 在添加唯一验证的情况下批量新增,只有最后一条数...
Opengraph URL: https://github.com/APIJSON/APIJSON/issues/865
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug] 唯一验证时批量新增,只有最后一条数据入库成功","articleBody":"### APIJSON Version/APIJSON 版本号\n\n8.1.8\n\n### Database Type & Version/数据库类型及版本号\n\nMySql 8.0.32\n\n### Environment/环境信息\n\n```markdown\n- JDK/基础库: jdk17\n- OS/系统: windows\n```\n\n### APIAuto Screenshots/APIAuto 请求与结果完整截屏\n\n在添加唯一验证的情况下批量新增,只有最后一条数据入库成功\n\n### Current Behavior/问题描述\n\n```markdown\n在添加唯一验证的情况下批量新增,只有最后一条数据入库成功。经测试,是因为每条数据经过AbstractVerifier.verifyRepeat 做重复验证后调用了executor.close(),导致最终的AbstractSQLExecutor.commit只提交了最后一个连接,因为前面的都被close清空了。座椅只有最后一条数据被插入数据库,前面的因为连接被关闭清空没插入成功\n```\n\n### Expected Behavior/期望结果\n\n```markdown\n在添加唯一验证的情况下批量新增,所有数据都能数据入库成功\n```\n\n### Any additional comments?/其它补充说明?\n\n```markdown\nAbstractVerifier里的 verifyCondition verifyExist verifyRepeat 都会关闭链连接,是否都会造成上述情况?\n```","author":{"url":"https://github.com/QingShan512","@type":"Person","name":"QingShan512"},"datePublished":"2026-07-10T09:40:45Z","url":"https://github.com/APIJSON/APIJSON/issues/865"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f79bf225-2a29-a22e-512d-d41c92db0673 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8210:4E4E7:114EEDA:17032C7:6B06578B |
| html-safe-nonce | 4c729851b95bc4c94c356860adeaeff0190af1341005f5408ff7dca7403f6b61 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjEwOjRFNEU3OjExNEVFREE6MTcwMzJDNzo2QjA2NTc4QiIsInZpc2l0b3JfaWQiOiIxNTY5NDI0NDA5NDQ4ODMwODU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c3c4c94a62891689bc084ee28bdb1a5ae706e282bbff6bc8295604cbfc138f6c |
| hovercard-subject-tag | issue:4853867628 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/APIJSON/APIJSON/865/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dd14cb13e6d6e2a78fb906e5675c7fcdaee42388953b02861f941601e1e31c9f/APIJSON/APIJSON/issues/865 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dd14cb13e6d6e2a78fb906e5675c7fcdaee42388953b02861f941601e1e31c9f/APIJSON/APIJSON/issues/865 |
| og:image:alt | APIJSON Version/APIJSON 版本号 8.1.8 Database Type & Version/数据库类型及版本号 MySql 8.0.32 Environment/环境信息 - JDK/基础库: jdk17 - OS/系统: windows APIAuto Screenshots/APIAuto 请求与结果完整截屏 在添加唯一验证的情况下批量新增,只有最后一条数据入库成... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | QingShan512 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297 |
| turbo-cache-control | no-preview |
| go-import | github.com/APIJSON/APIJSON git https://github.com/APIJSON/APIJSON.git |
| octolytics-dimension-user_id | 41146037 |
| octolytics-dimension-user_login | APIJSON |
| octolytics-dimension-repository_id | 74359442 |
| octolytics-dimension-repository_nwo | APIJSON/APIJSON |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 74359442 |
| octolytics-dimension-repository_network_root_nwo | APIJSON/APIJSON |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f0aa75f4141d440c6110dc31af7ea7797abb6c4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width