### What? Properly specifies `$lookup.from` when the collection name is singular. ### Why? MongoDB can pluralize the collection name and so can be different for singular ones. ### How? Uses the collection name from the driver directly `adapter.collections[slug].collection.name` instead of just `slug`.
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.