mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1365] fix rare query test failures due to nondeterminism without order by clause #9425
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.