[PR #1365] fix rare query test failures due to nondeterminism without order by clause #9425

Closed
opened 2026-01-22 16:04:17 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1365

State: closed
Merged: No


I was wondering why this travis testrun failed. I investigated and found that the queries involved did not have order by clauses, but were assuming that the query result would return in the same order in which the records were persisted. This is not guaranteed to be the case on most RDBs.

This PR simply adds an order by clause to the queries that will produce a deterministic result and prevent spurious test failures.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1365 **State:** closed **Merged:** No --- I was wondering why [this travis testrun](https://travis-ci.org/doctrine/doctrine2/jobs/57045280) failed. I investigated and found that the queries involved did not have order by clauses, but were assuming that the query result would return in the same order in which the records were persisted. This is not guaranteed to be the case on most RDBs. This PR simply adds an order by clause to the queries that will produce a deterministic result and prevent spurious test failures.
admin added the pull-request label 2026-01-22 16:04:17 +01:00
admin closed this issue 2026-01-22 16:04:17 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9425