{"comment":{"created_at":"2011-10-26T19:02:34Z","body":"Or if you're into monkey-patching, throw this in an initializer:\r\n\r\n```ruby\r\nActiveRecord::Base.instance_eval do\r\n  def using_object_ids?\r\n    false\r\n  end\r\nend\r\n```","updated_at":"2011-10-26T19:02:34Z","url":"https://api.github.com/repos/mongoid/mongoid/issues/comments/2534631","id":2534631,"user":{"avatar_url":"https://secure.gravatar.com/avatar/49de4cd2f26705785cbef2b15a9df7aa?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"49de4cd2f26705785cbef2b15a9df7aa","url":"https://api.github.com/users/nickhoffman","id":21668,"login":"nickhoffman"}},"action":"created","issue":{"number":1378,"created_at":"2011-10-26T17:14:10Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I'm getting an error that I think might be related to the fact that the association ID's in mongo are not BSON object_ids.\r\n\r\nAn example of the model in json: https://gist.github.com/1317032    (I'm querying company_id)\r\n\r\nThe line that generated the error:\r\n\r\n    @registers = Register.where(:company_id => current_user.company_id)\r\n\r\nThe error:\r\n\r\n    undefined method `using_object_ids?' for #<Class:0x0000010c251658>\r\n\r\nThe framework trace:\r\n\r\n    activerecord (3.1.0) lib/active_record/base.rb:1082:in `method_missing'\r\n    mongoid (2.3.2) lib/mongoid/fields/serializable/foreign_keys/object.rb:21:in `object_id_field?'\r\n    mongoid (2.3.2) lib/mongoid/fields.rb:200:in `object_id_field?'\r\n    mongoid (2.3.2) lib/mongoid/extensions/object_id/conversions.rb:49:in `block (2 levels) in convert'\r\n    mongoid (2.3.2) lib/mongoid/extensions/object_id/conversions.rb:48:in `each_pair'\r\n    mongoid (2.3.2) lib/mongoid/extensions/object_id/conversions.rb:48:in `block in convert'\r\n    mongoid (2.3.2) lib/mongoid/extensions/object_id/conversions.rb:47:in `tap'\r\n    mongoid (2.3.2) lib/mongoid/extensions/object_id/conversions.rb:47:in `convert'\r\n    mongoid (2.3.2) lib/mongoid/criterion/inclusion.rb:216:in `block in where'\r\n\r\nUsing gems in a rails 3.1 app: \r\n    * bson_ext-1.4.1.gem\r\n    * mongo-1.4.1.gem\r\n    * mongoid-2.3.2.gem","comments":4,"title":"Switching from MongoMapper > Mongoid, getting undefined method `using_object_ids?'","updated_at":"2011-10-26T19:02:34Z","url":"https://api.github.com/repos/mongoid/mongoid/issues/1378","id":2059040,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/abed21abff74d51f99d8ae6ad8e5a3e9?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"abed21abff74d51f99d8ae6ad8e5a3e9","url":"https://api.github.com/users/dmix","id":12528,"login":"dmix"},"html_url":"https://github.com/mongoid/mongoid/issues/1378","labels":[],"state":"open"},"legacy":{"issue_id":2059040,"comment_id":2534631}}