Skip to content

OrderBy over hasMany returns wrong data #728

@qwerin

Description

@qwerin

To Reproduce

$authorsOrderby=$this->orm->authors->findAll()->orderBy('books->title');
$authors=$this->orm->authors->findAll();
Assert::same($authorsOrderby->count(),$authors->count());

To Fix
Remove this Line:

$groupBy = array_merge($groupBy, $expression->columns);

Versions::

  • Database: MariaDB 10.8.8
  • Orm: 5.0.1
  • Dbal: 5.0.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions