When actions created at the same second sometimes their order is wrong
Closed this issue · 5 comments
vkartaviy commented
That's due to the same value in createdAt field.
It looks like we need to add timestamp field to the model or something that will prevent order corrupting?
It also possible to fix that by adding additional sorting on _id field here https://github.com/stephpy/TimelineBundle/blob/master/Driver/ODM/TimelineManager.php#L41 , but I am not sure is that good solution?
What do you think?
stephpy commented
I guess sorting by createdAt DESC + id DESC would be sufficient.
vkartaviy commented
Should I create PR for that or you think it's better to override it locally?
stephpy commented
If you can, i think you can make a PR ;)
vkartaviy commented
OK, I will, but little bit later today :)
stephpy commented
Thanks ;)