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

Model#inspect includes additional _id and _type fields

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.0.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      class Widget
      include Mongoid::Document

      identity :type => Integer
      field :name, :type => String
      end

      Widget.new :_id => 5, :name => "Fred" #=> #<Widget _id: 5, _type: nil, _id: 5, name: "Fred">

      As you can see, the _id field appears a second time, and the _type field appears even though there's no inheritance going on. This is on 2.0.0.rc.8.

            Assignee:
            durran Durran Jordan
            Reporter:
            chrishanks Chris Hanks
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: