-
Notifications
You must be signed in to change notification settings - Fork 130
Fix validating bulk insert assigning same ID to all items #929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix validating bulk insert assigning same ID to all items #929
Conversation
Previously, when inserting multiple items with the same key in a single bulk insert operation, later items would silently overwrite earlier ones. This fix adds tracking of keys already processed within the current batch, throwing a DuplicateKeyError when duplicate keys are detected.
🦋 Changeset detectedLatest commit: 7323748 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
More templates
@tanstack/angular-db
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
|
Size Change: +44 B (+0.05%) Total Size: 87.1 kB
ℹ️ View Unchanged
|
|
Size Change: 0 B Total Size: 3.34 kB ℹ️ View Unchanged
|
samwillis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely and simple ![]()
|
🎉 This PR has been released! Thank you for your contribution! |
Previously, when inserting multiple items with the same key in a single bulk insert operation, later items would silently overwrite earlier ones. This fix adds tracking of keys already processed within the current batch, throwing a DuplicateKeyError when duplicate keys are detected.
🎯 Changes
✅ Checklist
pnpm test:pr.🚀 Release Impact