-
Notifications
You must be signed in to change notification settings - Fork 11.4k
[5.4] If there is a withCount, Than also is withSum/withAvg/withMin/withMax #18303
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
Conversation
This is actually a breaking change for the This is breaking because Also this is missing tests, but it's a nice feature would like to see it into the framework 😄. Old PR #16815 |
@fernandobandeira |
public function getRelationExistenceAggregateQuery(Builder $query, Builder $parentQuery, $type, $column) | ||
{ | ||
return $this->getRelationExistenceQuery( | ||
$query, $parentQuery, new Expression("$type($column)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually should wrap the column name here:
Expression($type.'('.$this->query->getGrammar()->wrap($column).')')
The rest seems fine now 👍
If this is a breaking change we can not merge it into 5.4. |
@taylorotwell Any chance this would make it into 5.5? What changes would be necessary, except the stated defaults (PK or * instead of "id")? |
@xuqihua can you make it for 5.5? |
@decadence |
@xuqihua |
@decadence |
No description provided.