I'm writing a web service with akka-http and ReactiveMongo. I faced with problem, which I unable to resolve by myself.
I have method
def saveRoute(route: Route)(implicit writer: BSONDocumentWriter[Route]): Future[WriteResult] = {
collection.insert(route)
}
The problem is WriteResult
doesn't contain any useful information except error or OK status.
Could you please explain how to get inserted object ID after insert.
All examples which I've found are either related to old version with LastError
or with Play! Framework.