Q: Does Sequelize findAll [Op.or] return in order? Let's say I have this very basic search

const from = 'something';
const to = 'somethingElse';

const firstSearchCondition = { from, to: 'test' };
const secondSearchCondition = { from: 'test', to };

const models = await Model.findAll({
      where: {
        [Op.or]: [
          firstSearchCondition,
          secondSearchCondition
        ],
      },
    });

const [toTest, fromTest] = models;

if (toTest && fromTest) {
   // both models exist
}


when both models exist, is toTest 100% from firstSearchCondition? or the order is not guaranteed

A: Order is not guaranteed unless you use an order by clause. Regardless of the query.

A: Thanks to @Lev and some more researches on my side, what I've come up as solution is something like this:
hope it helps future people ( if you have any idea to make it better, hit me up )
let toTest = null;
let fromTest = null;

for (let i = 0; i < models.length; i += 1) {
  if (models[i].to === 'test') {
          toTest = models[i];
  } else {
          fromTest = models[i];
  }
}

// check here if both exist


