Relationship Object IDs

Stores relationship and upload field values as ObjectIDs in MongoDB

Official 13 8/wk MIT v0.1.0

Installation

pnpm add @payloadcms/plugin-relationship-object-ids

About

Relationship Object IDs makes every relationship and upload field in a Payload project save its references as MongoDB ObjectIDs rather than plain strings. The conversion runs just before each document is written, so no changes are needed in the field definitions themselves.

This suits projects that query or join data with other MongoDB tools expecting native ObjectIDs, or that want consistent ID types across collections. Documents saved before the plugin was added keep their string references until they are saved again, so converting older data means resaving each document, which can be scripted.

Package info

Package name
@payloadcms/plugin-relationship-object-ids
Latest version
0.1.0
Unpacked size
25 kB
License
MIT
Weekly downloads
8
Last publish
Feb 20, 2026

More from payloadcms

View profile

Stores Payload upload files in Cloudflare R2 buckets instead of local disk

Adds a parent field and breadcrumbs to collections so documents can nest inside each other

Sends Payload server errors and selected HTTP errors to Sentry with user context

Adds an SEO tab with meta title, description, image and search preview to collections

Stores collection uploads in Vercel Blob Storage instead of local disk

Lets one Payload admin panel manage content for many separate tenants

Similar plugins

More in Fields

Builds site and admin themes from color harmonies, with contrast checks in light and dark

Pedigree fields, relatives and family-tree views for Payload collections

Color, icon, encrypted and unit-aware measurement fields for Payload admin

Adds theme presets, live preview and contrast checks to the Payload admin

Groups Payload fields inside a drawer that opens from a button or icon

Adds a barcode scan button to text fields in the Payload admin panel