Reputation: 121
Is there a tutorial how I can use mongodb database with scala play 2.0?
On the official website (playframework.org) there seems to be only the SQL example.
Upvotes: 12
Views: 10683
Reputation: 16755
I have been working on this for sometime. Check my blog. You might find it useful. Let me know if you find any problem/mistake.
https://howtoscala.wordpress.com/2017/04/20/playing-with-mongodb-reactive-mongo/
Upvotes: 0
Reputation: 1703
You can try to use the ReactiveMongo plugin:
https://github.com/ReactiveMongo/Play-ReactiveMongo
It is for the 2.3 version of Play Framework and provides good instructions on how to add support for mongoDB data to your Play installation along with controller samples.
I hope this helps.
Upvotes: 0
Reputation: 7682
Here's the official plugin for salat
https://github.com/leon/play-salat
Give me a shout if you can't get it working.
Upvotes: 10
Reputation: 1187
I spent some time on integration of the MongoDb support in the todo application (using salat extension) from the official Play Framework site.
https://github.com/Mironor/Play-2.0-Scala-MongoDb-Salat-exemple
Hope this will help
Upvotes: 2
Reputation: 9036
Have you checked out this project:
https://github.com/vznet/play-mongo-jackson-mapper
Upvotes: 6