-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Breaking change in query builder in v11.38 #54192
Comments
I'm taking a look before it's reverted too quickly. |
I tried to reproduce your issue but I get the same error with Laravel v11.37. The generated SQL query was already using the This query works Product::groupBy('id')->having('id', '>=', 12345)->min('id'); |
@GromNaN It still shouldn't cause any breaking change. The PR should have targetted |
Breaking changes reverted in 11.38.2 |
@crynobone this issue doesn't show any breaking change. The code sample was already not working before the PR you reverted. |
@GromNaN I can come up with a way how this is breaking. It probably has to do with my select I had as well. |
Sorry it was very difficult to come up with a 'minimal test'. As noted in the initial issue, the query is complex and I need to 'reduce' it to narrow it down to show the actual issue and make it understandable for everyone.
I've verified that this works in v11.37.0. |
Laravel Version
11.38.x
PHP Version
8.3.x
Database Driver & Version
No response
Description
@taylorotwell @GromNaN I can confirm that this: #53679 is breaking. Although you thought it was not.
With a having clause the
->min(...)
makes the query itself a subquery making the grouped column 'unreadable'.Steps To Reproduce
Query is an breaking example. My query has 3 joins and other conditions (but breaks in the same way).
The text was updated successfully, but these errors were encountered: