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.
fix: scope orderable join reordering by parent relation (#15842)
## Context The root problem was scope leakage in join-based ordering. Reorder operations were effectively treating join items as one shared list, so moving an item in one parent context could influence ordering in a different parent context. ## Changes - Reorder key generation, adjacent-row lookup, and initial missing-key backfill now run in the same join `on` scope as the target item. - Fast drag/drop cases that send `pending` now resolve against scoped context before computing new keys. - `index.ts` keeps orchestration, and scoped query logic is extracted into focused helpers to keep behavior changes easier to review. - Replaced a local where-wrapper with the shared `combineWhereConstraints` utility. ## Impact Users can reorder join rows without cross-parent side effects. Items in unrelated parent relations no longer jump or get new keys from another parent's ordering context. --------- Co-authored-by: German Jablonski <GermanJablo@users.noreply.github.com>
G
German Jablonski committed
17a0d196f4570951715fe9782884591f659ceffe
Parent: fe36dde
Committed by GitHub <noreply@github.com>
on 3/6/2026, 4:54:50 PM