-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
withCount bug when using custom select #24797
Comments
With how Try calling the |
Here's another one about the same "issue" - #19388. |
@Harry-Torry I'm total aware that changing order fix the issue (I showed this in the issue). I also saw implementation, but it's quite risky when it works like this and there is no additional information about this in documentation. |
Submit a PR to the docs 👍 |
Description:
Using
withCount
together with conditions and customselect
causes running invalid queries.Steps To Reproduce:
When having relationship defined like this:
When running code like this:
or
SQL looks like this:
and bindings look like this:
so everything is as expected.
But running code like this
SQL looks like this:
and bindings looks like this:
The are at least 3 problems here:
The text was updated successfully, but these errors were encountered: