As last stage of my pipeline, I have a $project
like this :
{
...
anId : new ObjectId()
}
But mongo is generating the same Id for each document. I want it to generate a new different Id for each projected document. How to do so within the pipeline?