Skip to content

feat(db-*): add customID arg to db.create#15653

Merged
r1tsuu merged 2 commits intomainfrom
feat/add-custom-id-arg
Feb 17, 2026
Merged

feat(db-*): add customID arg to db.create#15653
r1tsuu merged 2 commits intomainfrom
feat/add-custom-id-arg

Conversation

@r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Feb 17, 2026

This PR adds customID argument to payload.db.create which can be used to ensure that a document is created with the provided ID, for example:

payload.db.create({ collection: 'posts', customID: 'ce98d6c4-c3ab-45de-9dfc-bf33d94cc941', data: { } })

This does not require to have a custom ID field in posts collection, as the following:

payload.db.create({ collection: 'posts', data: { customID: 'ce98d6c4-c3ab-45de-9dfc-bf33d94cc941' } })

Can be used only when you define a custom ID field

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2026

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

@r1tsuu r1tsuu merged commit 0935824 into main Feb 17, 2026
298 of 300 checks passed
@r1tsuu r1tsuu deleted the feat/add-custom-id-arg branch February 17, 2026 18:45
@github-actions
Copy link
Contributor

🚀 This is included in version v3.77.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments