fix: prevent batch insert loss during unique validation by 014-code · Pull Request #866 · APIJSON/APIJSON
Repository navigation
fix: prevent batch insert loss during unique validation - #866
Merged
TommyLemon merged 1 commit into APIJSON:master from 014-code:codex/fix-865-verifier-sql-executor Jul 14, 2026
Merged
fix: prevent batch insert loss during unique validation #866 TommyLemon merged 1 commit into APIJSON:master from 014-code:codex/fix-865-verifier-sql-executor
Conversation
014-code commented Jul 14, 2026
Copy link Copy Markdown
Contributor
Summary
Fixes #865 .
When batch inserting data with unique validation enabled, only the last record was committed successfully.
verifyExist and verifyRepeat previously reused the parser's shared SQL executor. Their cleanup logic closed that executor and cleared its connection map, causing previously inserted records to be excluded from the final transaction commit.
This change creates an independent SQL executor for verifier checks and binds it to the current parser, keeping verifier lifecycle management isolated from the parser transaction.
Changes
- Use
parser.createSQLExecutor()inverifyExist - Use
parser.createSQLExecutor()inverifyRepeat - Bind the new executor with
executor.setParser(parser) - Preserve the parser's shared executor for batch insert transactions
Verification
mvn -q -f APIJSONORM/pom.xml testpassedgit diff --checkpassed
fix: isolate verifier SQL executor for validation APIJSON#865
1f41d45
TommyLemon
merged commit ee359ae
into
APIJSON : master
Jul 14, 2026
1 check passed
TommyLemon commented Jul 14, 2026
Copy link Copy Markdown
Member
|
Thank you for your contribution~ |