Skip to content

Comments

[10.x] Followup Fix sql server ordering for distinct columns#47766

Closed
joelharkes wants to merge 5 commits intolaravel:10.xfrom
joelharkes:fix_sql_server
Closed

[10.x] Followup Fix sql server ordering for distinct columns#47766
joelharkes wants to merge 5 commits intolaravel:10.xfrom
joelharkes:fix_sql_server

Conversation

@joelharkes
Copy link
Contributor

@joelharkes joelharkes commented Jul 17, 2023

Followup #47763

trying to fix test cases for distinct + limit and paging

@joelharkes
Copy link
Contributor Author

I don't understand why the query builder still fails in the paginate function? 🤷

@joelharkes
Copy link
Contributor Author

it gives me:

 select distinct top 15 [users].* from [users] inner join [posts] on [posts].[user_id] = [users].[id] order by (SELECT 0)

but i'd expect me to give it:

 select distinct top 15 [users].* from [users] inner join [posts] on [posts].[user_id] = [users].[id] order by (SELECT [users].*)

side note: sql server cannot distinct on single column

@driesvints
Copy link
Member

@joelharkes looks like this PR needs some more work on its tests like you noticed. For this, we suggest you try a support channel in an attempt to figure out why they fail. It could very well be that there's no real solution here. If you have a PR with passing tests, feel free to send that in 👍

@driesvints driesvints closed this Sep 1, 2023
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.

2 participants