ruby - Rails+MongoDB: Find ObjectId bigger than given value -
I am trying to find the next (latest) document in MongoDB:
Article.find ({'_id' => gt; {"$ gt" = & gt; Mopped :: BSON :: Object ID (id_from_database)}} But every time I I get this query, I get it
Problem: Document (s) not found for class article with id (s) {"_id" => {"$ gt "= & Gt;" Value given "}}. I have installed these gems:
Mani 'monogoid' mani 'BSN' mani 'BSANIX' But still the problem is not found ... I would be grateful for every help!
Thanks < / Div>
the following object
article.where ({: _ id = & gt; { $ {Gt = & gt; id_from_database}}. Sort ({: _ id = & gt; 1}). First
Comments
Post a Comment