Questions tagged [reactivemongo]

Asynchronous & Non-Blocking Scala Driver for MongoDB

508 questions
0
votes
1 answer

Reactive Mongo Extensions: Pass List Of Values In $in Query using `Query DSL`

I am trying to pass multiples value in $in query using Query DSL with Reactive Mongo Extensions. But the result is empty list. Follwoing is my Code: def findUsersByRolesIds(rolesIds: List[BSONObjectID], page: Int, pageSize: Int): Future[List[User]]…
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
0
votes
1 answer

How to list collections in a db using ReactiveMongo

How do you list collections in a database using ReactiveMongo?
Wrench
  • 4,070
  • 4
  • 34
  • 46
0
votes
1 answer

Play-Framework: 2.3.x: play - Cannot invoke the action, eventually got an error: java.lang.IllegalArgumentException:

I am using play-framework 2.3.x with reactivemongo-extension JSON type. following is my code for fetch the data from db as below: def getStoredAccessToken(authInfo: AuthInfo[User]) = { println(">>>>>>>>>>>>>>>>>>>>>>: BEFORE"); //$doc("clientId"…
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
0
votes
1 answer

Nested queries with ReactiveMongo

I have an article collection where fields "title" and "publication" has a unique combined key constraint. When calling insertOrUpdateArticle(a: Article) it will first try to insert it, in case it hits the constraint, it should update the article -…
Wrench
  • 4,070
  • 4
  • 34
  • 46
0
votes
0 answers

Insert nested document using Reactivemongo, Play framework and Scala

I am new to Play framework 2.3 using scala and reactivemongo. I have already developed few pages to load data from forms into mongodb. So far so good. But now I’m planning to use nested document feature of mongodb as there is no direct support for…
0
votes
1 answer

Scala+ReactiveMongo db.runCommand("serverStatus")

How can I run db.runCommand("serverStatus") in scala 2.11.4? I'm using play2-reactivemongo 0.10.5.0.akka23 ? The db.command takes RawCommand in reactiveMongo which in turn is a BSONDocument. How to run commands of database like db.serverStatus() or…
0
votes
1 answer

Difference between ReactiveMongo , Mongo-Module and MongoHelper

Mongo with Play-Framework is new for me. I have Spring-Framework background, In which we create Controller, Business and DAO layer structure applications. Now, i want to taste the flavor of Play-Framework with ReactiveMongo. For create our sample…
0
votes
2 answers

Play2-Scala-Reactivemongo Losing Mongo schema flexibility using ReactiveMongo

I'm trying to use Play2 with ReactiveMongo to build my web application. I spent few days reading related documentation and tutorials. In my opinion one of the most powerful features of MongoDB is schema flexibility, that is the possibility of…
tano
  • 836
  • 1
  • 10
  • 25
0
votes
1 answer

Reactive Mongo: Trouble For Sync Multiple Queries In Reactive Mongo

I am using an Reactive Mongo with Scala and Play-Framework. I need to hitmultiple queries for update the result and retrieve the updated result. But in reactive our all queries are work in different threads, some time i need to sync the queries. How…
0
votes
0 answers

Testing Actor preStart()

I moved from Casbah to Reactive Mongo and from that moment I couldn't make work the test of my actor. I have a dao for the persistence layer and tests for that tier. All the tests passed. So, the only thing that comes to my mind its a problem of…
Ignacio Giagante
  • 364
  • 1
  • 5
  • 19
0
votes
0 answers

I cannot retrieve BSONDocument correctly

I have been spending time 3 hours and I wasn't success trying to retrieve a BSONDocument with all of the attributes. I don't why I only get the first attribute... where are the others? I wrote the following test describe("Testing reactive map user")…
Ignacio Giagante
  • 364
  • 1
  • 5
  • 19
0
votes
1 answer

Making it easier to create a Form object in Play Framework with ReactiveMongo

EDIT: For those who wonder how I plan to solve it according to the accepted answer, see Nested Values here. I'm using Play Framework with Scala and Reactive Mongo. Currently I'm creating my case classes and forms like this: case class Person( _id…
0
votes
1 answer

How to print only 2 result in reactivemongo

In reactivemongo my query look like this: val result =collName.find(BSONDocument("loc" -> BSONDocument("$near" -> BSONArray(51,-114)))).cursor[BSONDocument].enumerate() result.apply(Iteratee.foreach { doc =>…
panky
  • 137
  • 1
  • 1
  • 10
0
votes
1 answer

"$centerSphere" query in reactivemongo

I found click here here and I want to do "2d" indexing in reactivemongo and then want to use following query in reactivemongo db.collName.find({ loc: { $geoWithin: { $centerSphere: [ [lng, lat], radius / 6371 ] …
panky
  • 137
  • 1
  • 1
  • 10
0
votes
2 answers

Using case class for json validation and MongoDB persistense (Reactivemongo), what about id?

So, I have a case class as well as readers and writers for both JSON and BSONDocument format. Problem is, when inserting to MongoDB, I want to be able to specify the BSONObjectID, so I can return it upon creation. However, if I add a id:…
Wrench
  • 4,070
  • 4
  • 34
  • 46