{"issue":{"created_at":"2011-12-02T09:19:39Z","state":"open","updated_at":"2011-12-02T09:19:39Z","comments":0,"user":{"gravatar_id":"f2a5d82918d6f08f73a22fa49f83595a","id":22362,"url":"https://api.github.com/users/mvj3","avatar_url":"https://secure.gravatar.com/avatar/f2a5d82918d6f08f73a22fa49f83595a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"mvj3"},"body":"I split a log collection into two collections, the original is named as rpt_verb_path_params(RptVerbPathParams as model name), and the new one is rpt_syncs(RptSync).\r\n\r\nThey are truely use the same database\r\nirb(main):001:0> RptVerbPathParams.database == RptSync.database\r\n=> true\r\n\r\nBut when i start a new rails console\r\n[mvj3@lv current]$ bundle exec rails c\r\nLoading production environment (Rails 3.0.10)\r\nirb(main):001:0> RptSync.count\r\n=> 0\r\nirb(main):002:0> RptVerbPathParams.count\r\n=> 4199681\r\nirb(main):003:0> exit\r\n[mvj3@lv current]$ mongo\r\nMongoDB shell version: 1.8.3\r\nconnecting to: test\r\n> use love_sa\r\nswitched to db love_sa\r\n> db.rpt_syncs.count()\r\n2317134\r\n> db.rpt_verb_path_params.count()\r\n4981030\r\n>\r\n\r\nThe count is inconsistent, whatever rails console or mongo cmd. I think there is something wrong with mongoid.\r\n","assignee":null,"number":1472,"id":2425307,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Model.count is inconsistent","closed_at":null,"html_url":"https://github.com/mongoid/mongoid/issues/1472","url":"https://api.github.com/repos/mongoid/mongoid/issues/1472","milestone":null},"action":"opened"}