Saturday, 24 August 2013

Can't find() records from Play! application using mongoDB

Can't find() records from Play! application using mongoDB

I'm at the low end of the learning curve here, so please forgive the
simplistic question.
I have set up my first Play application and have implemented their
TodoList tutorial using a mongoDB database. My code basically mirrors this
code: https://github.com/Mironor/Play-2.0-Scala-MongoDb-Salat-exemple.
The application works fine, but when I use the command line, I can't find
any records:
$ mongo
> show dbs
local (empty)
todo 0.0625GB
> db.todo.find()
> db.todo.tasks.find()
>
I know the todo database is the one I want because when I drop it my data
goes away.
I know there are records in there because I can see them in the application
I think I should find these records in db.todo.tasks because it is
specified by the model
So how do I find these records from the command line console?

No comments:

Post a Comment