--
You received this message because you are subscribed to the Google Groups "sug-it" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sug-it+un...@googlegroups.com.
To post to this group, send email to sug...@googlegroups.com.
Visit this group at http://groups.google.com/group/sug-it.
For more options, visit https://groups.google.com/d/optout.
def collection: JSONCollection = db.collection[JSONCollection]("persons")
db is injected somehow from the application.conf
declaring "def collection" is what makes the trick to have the "collection" variable always available in the code.
my problem was very level, like how can I access a val in different method without having to call all the connection.db and db.collection all the time...
Probably the driver is smart enough... Anyway I'll follow that thanks.