Fixes https://github.com/payloadcms/payload/issues/13045 `updateOne` when returning is `false` mutates the data object for write operations on the DB, but that causes an issue when using that data object later on since all of the id's are mutated to objectIDs and never transformed back into read id's. This fix ensures that the transform happens even when the result is not returned.
Payload MongoDB Adapter
Official MongoDB adapter for Payload.
Installation
npm install @payloadcms/db-mongodb
Usage
import { buildConfig } from 'payload'
import { mongooseAdapter } from '@payloadcms/db-mongodb'
export default buildConfig({
db: mongooseAdapter({
url: process.env.DATABASE_URI,
}),
// ...rest of config
})
More detailed usage can be found in the Payload Docs.