Play-ReactiveMongo is a plugin for Play 2.x, enabling support for ReactiveMongo – reactive, asynchronous and non-blocking Scala driver for MongoDB.
Questions tagged [play-reactivemongo]
148 questions
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…

User12345678
- 31
- 1
- 6
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…

Harmeet Singh Taara
- 6,483
- 20
- 73
- 126
0
votes
1 answer
Find all the entries in collection - Play 2.3 reactive-mongo plugin
I'm working on play 2.3 with reactive mongo play plugin. I want to query the db which should give me all the entries.
Below I have given a snippet. The next line to the comment "FIND ALL THE TAGS", is the place where I am trying to fetch all the…

Kaushik
- 1,271
- 2
- 18
- 35
0
votes
1 answer
Playframework 2.3.x: Json mapping error "Multiple markers at this line: No unapply function found"
i am new in scala and play framework. Trying to create an sample application by using mongo reactive and play-framework with scala. But i face an issue. When i trying to map my case class, to format for JSON, i am getting an following compile time…

Harmeet Singh Taara
- 6,483
- 20
- 73
- 126
0
votes
0 answers
play2 mongodb MongoCursor to Json
I am using Play2 framework with play-reactivemongo and casbah. I have the following Code:
def geofence(lat:Float, lon:Float, rad:Float) = Action { request =>
val mongoColl = MongoConnection()("db")("geofence")
…

ruby4newb
- 11
- 6
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
0
votes
1 answer
ReactiveMongo + Play Generic NullPointerException
I'm trying to incorporate a very simple Mongo model for my app, but my initial attempts have been futile. I am getting stuck with a NullPointerException and I've even tried wrapping my call with a Try and end up with a…

Benny
- 3,899
- 8
- 46
- 81
0
votes
1 answer
Reactivemongo nested JSON structure
I'm currently working on simple project in Play Framework 2.3.6 with reactivemongo "org.reactivemongo" %% "play2-reactivemongo" % "0.10.5.0.akka23" and I have problem with nested structure.
My goal is to map such as JSON structure (to Scala…

Maciek Młynarski
- 3
- 1
- 1
0
votes
2 answers
Reactivemongo TTL collections
I know I can set TTL in MongoDB with
db.ttl_collection.ensureIndex( { "Date": 1 }, { expireAfterSeconds: 10 } )
and I know I can ensure index with Scala in Reactivemongo with
collection.indexesManager.ensure(index)
But how can I set TTL…

Krzysztof Wende
- 3,208
- 25
- 38
0
votes
2 answers
Action(parser.json) vs Action.async Error, and using concurrent.Execution.Implicits made could not initialize class controllers in Play Scala
I'm trying to create a post request for insert a data to mongoddb using :
1. sbt 0.13.6
2. play 2.10
3. scala 2.11.2
4. play2-reactivamongo 0.10.2
5. mongodb 2.6.4
data post by json, and create a case class for the model, and using JSPath to convert…

Hendri
- 45
- 6
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
-1
votes
1 answer
object BSONDocumentFormat in trait BSONFormats is deprecated: 0.11.9
I have a following function that takes in an input JSON and validates it against a given JSON-Schema using the "com.eclipsesource" %% "play-json-schema-validator" % "0.6.2". This whole setup is working great until I have started getting warnings…

summerNight
- 1,446
- 3
- 25
- 52