Skip to content

fix: orderable collection not working when collection has group or tab field #12129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kristian240
Copy link
Contributor

What?

There is an issue when Payload uses postgresAdapter. If collection is orderable and there is a field that is type of group or tab.

I cannot replicate the issue in e2e tests and mongoDB but if I use Postgres the issue is there; can you shed some light why is that? Also, how can I run e2e with Postgres db?

Why?

After the group and tab fields are transformed, there is a piece of code that deletes _order prop on the root of the document, instead, we should delete _order in that field.

How?

Now, we delete _order in ref[refKey] instead on the root document - ref.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant