title: How to query mongodb from groovy/grails?
body: <p>Do I have to have a domain object to query <code>mongodb</code>? </p>
  
  <p>What if I just want some raw data to be displayed? What would be the syntax to query <code>mongodb</code> from my controller?</p>
  
  <p>I tried </p>
  
  <pre><code>"def var = db.nameOfMyCollection.find()"
  </code></pre>
  
  <p>but it says no such property as db in my controller class. </p>
  
  <p>I know that my application is connecting to the database because I am monitoring <code>mongo server</code> log and it increases the number of connections by one when I launch my grails app.</p>