How to get the newly inserted document

13 views
Skip to first unread message

Riccardo Sirigu

unread,
Aug 23, 2017, 3:32:36 AM8/23/17
to ReactiveMongo - http://reactivemongo.org
Hi everyone,

Is there a way to get the newly inserted document without using the trick of generating the _id by hand and fetching the corresponding document afterwards?

Thank you in advance

Cédric Chantepie

unread,
Aug 23, 2017, 4:00:20 AM8/23/17
to ReactiveMongo - http://reactivemongo.org
Hi,

About that, there is nothing specific to ReactiveMongo or to any driver BTW: write operations are those supported by the MongoDB service. Better to have first a look at the documentation about that.

> Operations like insert or update won't return the document. You can try findAndModify.

Reply all
Reply to author
Forward
0 new messages