payloadcms / payload

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.
https://payloadcms.com
MIT License
27.66k stars 1.72k forks source link

fix(db-postgres): joins with versions and hasMany relationship #9370

Closed r1tsuu closed 21 hours ago

r1tsuu commented 2 days ago

Fixes errors when having joins with versions +drafts on hasMany: true relationships. Removes joinQuery overhead if we don't need it for the current operation. Right now, in all adapters we support joins only for find, findOne, and queryDrafts.

Fixes https://github.com/payloadcms/payload/issues/9369