Skip to content

Breaking change in query builder in v11.38 #54192

@rikvdh

Description

@rikvdh

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).

Product::groupBy('products.id')->having('products.id', '>=', 12345)->min('products.id');

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions