You can now disable fallback sort in the mongodb adapter by passing `disableFallbackSort: true` in the options. We also no longer add fallback sort to sorts on unique fields by default now. This came out of a discussion in this issue https://github.com/payloadcms/payload/issues/12690 and the linked PR https://github.com/payloadcms/payload/pull/12888 Closes https://github.com/payloadcms/payload/issues/12690
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.