title: Mongoid where clause ruby hash
body: <p>Say I have a mongoid document which has a field <code>:pairs</code> with the type of hash. When I wan't to query on the hash like this:</p>
  
  <pre><code>Doc.where(:pairs=&gt;{"field1"=&gt;1})
  </code></pre>
  
  <p>I get results back because I have in pairs a field with value one. I also have values for more than <code>1</code>. When I do the following, <code>nil</code> is returned:</p>
  
  <pre><code>Doc.where(:pairs=&gt;{"field1"=&gt;{"$gt"=&gt;0}})
  </code></pre>
  
  <p>This doesn't seem to work, and I do have pairs with key <code>field1</code> and values bigger than <code>0</code>. Can anyone provide me info on why this doesn't work?</p>