Skip to content
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

Unknown column in HAVING clause #662

Closed
stepapo opened this issue Apr 10, 2024 · 2 comments · Fixed by #664
Closed

Unknown column in HAVING clause #662

stepapo opened this issue Apr 10, 2024 · 2 comments · Fixed by #664
Labels
Milestone

Comments

@stepapo
Copy link

stepapo commented Apr 10, 2024

Describe the bug

I tried RC version of 5.0 and so far so good except for one thing in MySQL. It's connected to this comment. That bug was fixed, difference is in IColletion::OR operator. The reason remains the same, two columns with the same name from different tables in HAVING clause. This works in 4.0

To Reproduce

$books = $this->orm->books->findBy([
  ICollection::OR,
  'tags->id' => 1,
  'author->name' => 'Writer 1',
  'publisher->name' => 'Nextras publisher A',
]);
Assert::same($books->count(), 3);

MySQL: Unknown column 'author.name' in 'having clause'

Versions

  • Database: MariaDB 11.0.2
  • Orm: 5.0.0-rc1
  • Dbal: 5.0.0-rc4
@stepapo stepapo added the bug label Apr 10, 2024
@hrach
Copy link
Member

hrach commented Apr 10, 2024

Thank you for testing and this report. It seems now there is a lot of "infrastructure" to be able to fix this :)

@stepapo
Copy link
Author

stepapo commented Apr 10, 2024

Thank you for the fix, that was very fast :-) Works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants