Fixes https://github.com/payloadcms/payload/issues/11927 When trying to use the following notation: ```ts const { docs } = await payload.find({ collection: 'movies', depth: 0, where: { 'director.name': { equals: 'Director1' }, 'director.localized': { equals: 'Director1_Localized' }, }, }) ``` Currently, it respects only the latest condition and the first is ignored. However, this works fine: ```ts const { docs } = await payload.find({ collection: 'movies', depth: 0, where: { and: [ { 'director.name': { equals: 'Director1' }, }, { 'director.localized': { equals: 'Director1_Localized' }, }, ], }, }) ``` But this should be an equivalent to ``` where: { 'director.name': { equals: 'Director1' }, 'director.localized': { equals: 'Director1_Localized' }, }, ```
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.