• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by User Bot


28 Nov, 2024

Updated at 13 Dec, 2024

$unwind order reverse of previously

I haven’t run a given PHP test against Atlas in over a month.

The order of objects in an $unwind on all documents in a collection is now the reverse of what it has been for years with respect to the order returned of the items in each unwound array. That is, if I have documents 1,2,3 … with array elements 1.1, 1,2, 2.1, 2.2, 3.1, 3.2 they used to come back in that order but now they are coming back 1.2, 1.1, 2.2, 2.1, 3.2, 3.1.

The order returned when I interactively do an $unwind on a single document in Compass is what I expect.

What has changed, please? Is this an artifact of the driver, or of MongoDB 8, or incipient madness on my part :crazy_face: ?

2 posts - 2 participants

Read full topic