Skip to content

docs(entities): document concurrency behavior of bulk methods - #348

Merged
wixysam merged 1 commit into
mainfrom
entities-concurrency
Oct 22, 2026
Merged

wixysam merged 1 commit into
mainfrom
entities-concurrency

Conversation

@wixysam

@wixysam wixysam commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

The AI chat has been telling users that concurrency "isn't documented, contact support" when they ask whether updateMany() is atomic, whether bulk calls are transactions, or whether 2 users can claim the same record at once. That caused about 210 tickets last month. Engineering confirmed the behavior, and it's now documented in Concurrent updates. This PR adds the same facts to the SDK reference.

What changes

  • updateMany(): each matching record is updated on its own, and the call isn't a transaction. Explains how to claim one record safely: pass its id as a plain value plus the conditions that must still be true, then check updated. Notes that conditions are only rechecked at write time for a single-id query. Adds a "Claim a record" example.
  • bulkCreate(), bulkUpdate(), deleteMany(), upsert(): not a transaction, so if the call fails partway, records already written stay written.
  • upsert(): concurrent calls with the same key can create duplicate records.

Each note links to the Concurrent updates section. JSDoc only, no code changes.

The generated page is in base44-dev/mintlify-docs#2735.

🤖 Generated with Claude Code

Add notes to updateMany(), bulkCreate(), bulkUpdate(), deleteMany(), and
upsert() saying they aren't transactions, and explain how to claim a
single record safely with updateMany(). Each note links to the new
Concurrent updates section in Entity Schemas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.56-pr.348.9938d5f

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.56-pr.348.9938d5f"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.56-pr.348.9938d5f"
  }
}

Preview published to npm registry — try new features instantly!

@wixysam
wixysam merged commit b7779b6 into main Oct 22, 2026
7 of 8 checks passed
@wixysam
wixysam deleted the entities-concurrency branch October 22, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants