mongoid
Mongoid: select embedded objects that fits number of options
I have got this structure class House include Mongoid::开发者_高级运维Document embeds_many :inhabitants[详细]
2023-04-04 02:20 分类:问答Difference with count result in Mongo group by query with Ruby/Javascript
I\'m using Mongoid to get a count of certain types of records in a Mongo database. When running the quer开发者_运维技巧y with the javascript method:[详细]
2023-04-03 11:59 分类:问答Mongoid `group()` conditions
I want to provide a condition for my grouping in Mongoid, but how can I send in multiple values for an attribute in the conditions hash? This is what I want to do:[详细]
2023-04-03 10:35 分类:问答Attributes of an Object
There is function of attributes_name in Active record by which I can check the keys of an object but I can check the blank keys for of an object which is of MongoID not of ActiveRecord,[详细]
2023-04-03 05:18 分类:问答Override a Mongoid model's setters and getters
Is there a way to override a setter or getter for a model in Mongoid?Something like: class Project include Mongoid::Document[详细]
2023-04-03 05:04 分类:问答Failing updates after upgrade to mongodb and mongoid
I have recently upgraded mongoid from 2.0.2 to 2.2.0 and mongodb from 1.8.1 to 1.8.3. After the upgrade I am facing weird issues while updating the user doument, which embeds a lot of other documents.[详细]
2023-04-03 04:46 分类:问答Mongoid is slow and shows this in the log: MONGODB cursor.refresh() for cursor 3474711247518436755
I am using admin_assistant and have hacked on MongoDB support. The only issue now is that the index page queries are incredibly slow. admin_assistant uses will_paginate for these queries. I verified t[详细]
2023-04-03 03:08 分类:问答Nested references not saved from embedded document using mongoid
Here a tricky issue dealing with nested documents, references and embedded documents. You can find a zip file containing a sample project illustrating the issue.[详细]
2023-04-03 01:58 分类:问答Using mongoid with map reduce on an enslaved model favors one mongodb slave
I\'ve got 4 mongodb slaves off of a master,and running a map reduce frequently on data in an enslaved model seems to favor the first slave by a factor of 5开发者_如何学Gox.[详细]
2023-04-02 18:41 分类:问答Mongoid has_and_belongs_to_many associations
I trying to get mongoid to save associations, but I can only get one side to work. If I have the following test.[详细]
2023-04-02 06:48 分类:问答