Questions tagged [play-reactivemongo]

Play-ReactiveMongo is a plugin for Play 2.x, enabling support for ReactiveMongo – reactive, asynchronous and non-blocking Scala driver for MongoDB.

148 questions
1
vote
1 answer

BSONDocument to JsObject and override BSONDateTimeFormat

I use ReactiveMongo 0.11.11 for Play 2.5 and want to convert a BSONDocument to a JsObject. For most BSON data types (String, Int...) the defaults are perfectly fine to let the library do the job. For BSON type DateTime (BSONDateTime) the value of…
Nick
  • 2,576
  • 1
  • 23
  • 44
1
vote
2 answers

How to remove _id from MongoDB results?

I am inserting json file into Mongodb(with Scala/Play framework) and the same getting/downloading it into my view page for some other requirement, but this time it is coming with one "_id" parameter in the json file. But I need only my actual json…
Dhana
  • 711
  • 3
  • 14
  • 40
1
vote
0 answers

Reactivemongo failing on AWS and Google Compute

I am running into strange situation, I am using version 11.11 for play 2.5.1. My application is working fine with local mongodb. When I launch applicaiton on AWS or Google compute, it is stuck during collection.find, as a fact any type of operations…
Srinivas
  • 553
  • 9
  • 21
1
vote
2 answers

How to use ReactiveMongo + JSON aggregation framework in Play Framework?

I need to utilize MongoDB's aggregation framework using ReactiveMongo. I only find this example which uses BSON. I would like to use JSON so I changed the code to : def populatedStates(col: JSONCollection) = { import…
Roger Chien
  • 344
  • 3
  • 13
1
vote
1 answer

Upgrade ReactiveMongo Play 2.3 app from 2.6 to 3.0

I had a perfectly good working Scala Play 2.3 app using ReactiveMongo running on Heroku against a MongoLab 2.6 database, now that MongoLab have updated their sandbox databases to 3.0 I can not get my app to start up. I have updated my local database…
Mark
  • 541
  • 2
  • 12
1
vote
0 answers

object ReactiveMongoPlugin in package reactivemongo is deprecated: Use ReactiveMongoModule and ReactiveMongoApi

I'm trying to migrate my project from using play2-reactivemongo version 0.10.5.0.akka23 to using version 0.11.7.play23. It is important to note that I'm using Play 2.3. The documentation for Play 2.4 says that I should use ReactiveMongoModule and…
1
vote
0 answers

Inject own implementation of ReactiveMongoApi in Play 2.4.2

I would like to know if someone can tell me how to inject an own implementation of ReactiveMongoApi into one specific controller. class MyController @Inject() (val reactiveMongoApi: ReactiveMongoApi, val messagesApi: MessagesApi...) extends…
1
vote
1 answer

No Json serializer as JsObject found for type play.api.libs.json.JsValue

I'm trying to migrate my project from using play2-reactivemongo version 0.10.5.0.akka23 to using version 0.11.7.play23. I've already added the following import to fix the problems addressed in this question: import…
1
vote
1 answer

No implicit format for List for BSONObjectID

one of my models includes a list of BSONObjectIDs: case class User( _id: BSONObjectID = BSONObjectID.generate, email: String, favorite_ids: List[BSONObjectID] = List(), home_folder_id: Option[BSONObjectID] = None ) unfortunately, the…
magegu
  • 530
  • 4
  • 18
1
vote
0 answers

Reactivemongo capped collection issues with Play 2.3

I followed the CappedCollection demo example and got an Iteratee up that consumes a capped collection with Play 2.2 and had no issues. After upgrading to Play 2.3, I am seeing strange issues when trying to stop the Iteratee. When play is shutdown i…
Art P
  • 11
  • 2
1
vote
1 answer

play-reactivemongo dealing with Indexes

I've found that in order to create an index in a collection I should use the indexesManager: collection.indexesManager.ensure(...) I would like to know which is the right place for this function call. I put this call in the function of the…
tano
  • 836
  • 1
  • 10
  • 25
1
vote
1 answer

PlayFramework MongoDB Project Setup Failed

I tried setting up a new Play Framework on Scala and MongoDB. I tried all documentation available online, but each time I tried running the project on the terminal I get some obscure error. I have tried to make sense out of it, but all effort prove…
Igbalajobi Jamiu
  • 261
  • 3
  • 14
1
vote
2 answers

ReactiveMongo mapping from ObjectId to case class BSONObjectID

i am new in Scala and Play, i am trying to map Scala BSONObjectID to mongo ObjectId. I got many samples from internet, but still stuck in one compile time error. Following is code of my Case Class: case class UserDetail( val _id:…
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
1
vote
1 answer

Working with databases containing more than 22 fields in Play 2.x

I am trying to migrate an application from Rails/Mongoid to Play/Reactivemongo with reactivemongo-extensions. Many of my documents have more than 22 fields. Play's JSON library does not seem to be able to handle > 22 fields. What is the preferred…
imagio
  • 1,390
  • 2
  • 16
  • 27
1
vote
0 answers

How to transform json with parameters and add validation

environment: play2.3 with reactivemongo I read the reactivemongo coast-to-coast article and liked the foundation of the article. Many of the examples are still beyond my comprehension at the moment, but I'm getting there. As part of exploring this…
darren
  • 579
  • 8
  • 23