Skip to content
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

Fix: Add conditions to DISTINCT and modify reorder conditions in PostgreSQL #15181

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

bzy107
Copy link
Contributor

@bzy107 bzy107 commented Dec 25, 2024

Description

This is a fix for issue #14814.

The problem was that in PostgreSQL, the results were always ordered by id. I added a condition to sort by the value specified on the screen if sorting is applied; otherwise, the results will fall back to sorting by id.

Additionally, the DISTINCT clause was always applied to id. A condition was added to handle cases where sorting is based on id.

Visual changes

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@danharrin danharrin added the bug Something isn't working label Dec 27, 2024
@danharrin danharrin added this to the v3 milestone Dec 27, 2024
@danharrin danharrin merged commit 2bbfeeb into filamentphp:3.x Jan 2, 2025
10 checks passed
@danharrin
Copy link
Member

Thank you for the investigation work and fix

@bzy107 bzy107 deleted the fix-order-due-to-using-chunks branch January 2, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants