Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1262

find with an Array does not find multiple non-ObjectId ids

       ruby
      Message.find [114869287646134350, 114869287646134398, 114869287646134388]
      
      Mongoid::Errors::DocumentNotFound: Document not found for class Message with id(s) 114869287646134350, 114869287646134398, 114869287646134388.
      from .../vendor/ruby/1.9.1/gems/mongoid-2.2.0/lib/mongoid/criterion/inclusion.rb:252:in `block in execute_or_raise'
      
       ruby
      [114869287646134350, 114869287646134398, 114869287646134388].map {|i| Message.find(i) }.map(&:id)
      => [114869287646134350, 114869287646134398, 114869287646134388]
      

      My guess is this has something to do with id being an integer instead of an ObjectId

            Assignee:
            Unassigned Unassigned
            Reporter:
            gregwebs gregwebs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: