diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cc80c4033..44c7a8218c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ * None. ### Fixed -* ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?) +* Having a query with a number of predicates ORed together may result in a crash on some platforms (strict weak ordering check failing on iphone) ([#8028](https://github.com/realm/realm-core/issues/8028), since v14.6.0) * None. ### Breaking changes diff --git a/src/realm/query_engine.hpp b/src/realm/query_engine.hpp index 39d39b43a5..573405b03e 100644 --- a/src/realm/query_engine.hpp +++ b/src/realm/query_engine.hpp @@ -2268,7 +2268,7 @@ class OrNode : public ParentNode { std::type_index m_type; bool operator<(const ConditionType& other) const { - return this->m_col < other.m_col && this->m_type < other.m_type; + return (this->m_col == other.m_col) ? this->m_type < other.m_type : this->m_col < other.m_col; } bool operator!=(const ConditionType& other) const {