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

Error when I use :stored_as => :array

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

      I had a field of the form

      class Whatsit
      include Mongoid::Document
      references_many :hoozits, :stored_as => :array, :inverse_of => :whatsit
      end

      that was working fine up until recently, but now when I try to save a Whatsit instance I get

      NoMethodError (undefined method `<<' for BSON::ObjectID('4c47584a321944a63100005a'):BSON::ObjectID)

      Any idea what's going on? Is the syntax described in the Mongoid docs on associations no longer accurate? I'm on mongoid 2.0.0.beta9 af80db8e53d021c0543aa7940052c21b79dfde86-3a4ca6, mongo 1.0.5, mongo_ext 0.19.3, bson 1.0.4, and bson_ext 1.0.4.

            Assignee:
            Unassigned Unassigned
            Reporter:
            trevorburnham Trevor Burnham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: