SIGN IN SIGN UP
payloadcms / payload UNCLAIMED

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

0 0 16 TypeScript

feat(db-mongodb): support sorting by fields in other collections through a relationship field (#11803)

This is already supported in Postgres / SQLite.
For example:
```
const result = await payload.find({
  collection: 'directors',
  depth: 0,
  sort: '-movies.name', // movies is a relationship field here
})
```

Removes the condition in tests:
```
 // no support for sort by relation in mongodb
 if (isMongoose(payload)) {
  return
}
```
S
Sasha committed
4081953c187af46febc6f4646f61be1a5ef846d0
Parent: f9f53a6
Committed by GitHub <noreply@github.com> on 3/20/2025, 8:49:21 PM