mongoid
Mongoid: find through Array of ids
I\'ve fetched a number of ids through MapReduce. I\'ve sorted those ids by some criteria and now I need to get those objects in this particular order:[详细]
2023-04-06 20:45 分类:问答Sorting by number of elements in array of the document in mongo [duplicate]
This question already has answers here: Mongo order by length of array (4 answers) Closed 8 years ago. Say i have a collection of answers where each answer contains an array of user_ids.[详细]
2023-04-06 20:10 分类:问答Duplicate Records created by find_or_create In Rails+Mongoid
I have an object Message which is only ever created by this line: Message.find_or_create_by(:api_id => params[\'message_id\'])[详细]
2023-04-06 09:21 分类:问答Moving document between collections in Mongo (via Mongoid)
I\'m building a card game (basic 52 card deck of playing cards 4 suits * 13 ranks), and I\'ve decided on MongoDB for this project.[详细]
2023-04-06 03:13 分类:问答Querying indexes in mongoid
Just wondering, if I index a field in mongoid is there a special query form I should be using to speed up queries using that 开发者_运维百科index or does Class.where(index: value) utilize that automat[详细]
2023-04-06 03:07 分类:问答Emulating join behavior with Rails and Mongoid
Just wanted to ask some advice when building a database with mongodb, I have been reading a lot that if you have a database with a lot of joins it\'s better to go with say postgresql.[详细]
2023-04-05 22:54 分类:问答Rails standard date selector results in nil date values in model
I am sure this is really simple, but I\'m missing something. This has always worked before. I\'m using Mongoid on Rails 3.1.[详细]
2023-04-04 17:06 分类:问答Referencing Mongoid recursively_embeds_many from another Document
I have two Document Models that are proving problematic: class Component include Mongoid::Document include Mongoid::Versioning[详细]
2023-04-04 16:04 分类:问答gem-install of mongoid throws an uninitialized constant in Ruby, works in irb
I am writing a script with Ruby/MongoDB that stores Tweets. After I gem-installed mongoid, this first-steps code throws an error:[详细]
2023-04-04 10:53 分类:问答rails mongoid clear criteria
Mongoid::Paranoia adds a default scope to the model which generates the criteria #<Mongoid::Criteria[详细]
2023-04-04 04:43 分类:问答