Asynchronous & Non-Blocking Scala Driver for MongoDB
Questions tagged [reactivemongo]
508 questions
0
votes
1 answer
In Play! application base document fields are not persisted to mongo db (reactive mongo plugin)
I have Play 2.3 appliction with reactive mongo plugin.
I have base document:
trait TemporalDocument {
val created: Option[DateTime] = Some(new DateTime())
val updated: Option[DateTime] = Some(new DateTime())
}
and one of the concrete…

janis.kom
- 38
- 8
0
votes
1 answer
Canonical implementation of findAndDelete using ReactiveMongo
Using ReactiveMongo, what would be the canonical way to find a single document using a query, delete this document and finally return it. I am also using the ReactiveMongo plugin for the Playframework. So far, I have come up with the following…

Fynn
- 4,753
- 3
- 32
- 69
0
votes
1 answer
how to use ReactiveMongo in play framework filter?
I am going to use ReactiveMongo in Play filter, How can i do this?
I can only find sample for using ReactiveMongo in Controller.
How can i access to db.collection in a Play filter?

Saeed Zarinfam
- 9,818
- 7
- 59
- 72
0
votes
0 answers
AbstractMethodError with Akka 2.3.3 and Play 2.3.1
I'm developing a Scala application using Play, Akka and ReactiveMongo. Here are the specific libraries I'm…

Tim Fleming
- 23
- 4
0
votes
0 answers
Understanding Read/Write Locking in Mongo 2.6
I am using Mongo 2.6 and the Reactive Mongo driver running on Ubuntu Linux.
I have a process which does the following:
Read a record, augment the record, then update the record.
Due to various constraints that operation can not be made more…

Wade
- 346
- 2
- 12
0
votes
0 answers
Dealing with date using reactivemongo and a json api
I am currently using a object containing a BSONDateTime :
case class Datez(date: BSONDateTime)
When this a list of Datez object is transformed to json the following string is generated :
[{"date":{"$date":1408053600000}},…

Manuel Leduc
- 1,849
- 3
- 23
- 39
0
votes
1 answer
Scala/Akka/ReactiveMongo: process does not terminate after system.shutdown()
I just started learning Scala and Akka and now I am trying to develop an application that uses ReactiveMongo framework to connect to a MongoDb server.
The problem is that when I call system.shutdown() in the end of my App object, the process does…

Uniqus
- 564
- 1
- 5
- 21
0
votes
1 answer
How to sequence these future functions in reactivemongo?
I have 4 functions, createUser, updateUser, deleteUser, listUser.
These 4 functions are all reactive.
How do I execute them by this sequence?
createUser->listUser(list created user)->updateUser->listUser(list updated user)>deleteUser->listUser
My…

iamtd1983
- 3
- 1
0
votes
1 answer
Not able to translate Stream(BSONDocument() to a BSONDocument
I'm trying to make use of the Aggregate in ReactiveMongo but I'm getting a strange error.
I create a Aggregate command like this:
val command = Aggregate("invites", Seq(
Match(BSONDocument("origin" -> 1, "status" -> 3, "created" ->…

jakob
- 5,979
- 7
- 64
- 103
0
votes
1 answer
find a single document with play+reactivemongo
function that receives an author object in the request
def login = Action.async (parse.json) {
request =>
request.body.validate[Author].map {
author =>
val query = Json.obj("username" -> "222")
val obj =…

user1538814
- 201
- 1
- 3
- 13
0
votes
1 answer
Building a document functionally and based on input value in a Play 2 controller in Scala and ReactiveMongo
I've a Play controller Action that edits a document in MongoDB using ReactiveMongo. The code is shown below. Both name and keywords are optional. I'm creating a temp BSONDocument() and adding tuples to it based on if name and keywords exist are not…

Soumya Simanta
- 11,523
- 24
- 106
- 161
0
votes
1 answer
Play reactive mongo : Update operation
I'm starting a project using play 2.2.3 and play-reactivemongo 0.10.2 (which recursively use reactivemongo 0.10.0).
I've read the documentation of both reacticemongo and play-reactivemongo along with a few projet I found on github but I can't figure…

Manuel Leduc
- 1,849
- 3
- 23
- 39
0
votes
3 answers
How to make Play print all the errors
In our Scala, Play, Reactivemongo we have a big problem with exception handling - when there is an error, in Iteratee/Enumeratee or in Actor system Play just swallows it, without logging any error to the output. So we effectively need to guess…

mavarazy
- 7,562
- 1
- 34
- 60
0
votes
1 answer
How to correctly authorize into Mongo server using Scala?
I have added authorization to my Mongo database and now I can't perform any queries whats so ever.
Every time I try I get:
reactivemongo.core.commands.DefaultCommandError: BSONCommandError['command failed because the 'ok' field is missing or…

PovilasID
- 883
- 10
- 34
0
votes
1 answer
Query for ranges in reactivemongo
How do I query for ranges using reactivemongo. Something equivalent to
db.collection.find( { field: { $gt: value1, $lt: value2 } } );
Thanks.

user203617
- 523
- 8
- 20