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

Mongoid::Association::Relatable#namespace_hierarchy method breaks with anonymous classes

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 8.0.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible

      This code demonstrates the issue:

       
       

      Class.new do
         include Mongoid::Document
         embeds_many :addresses
      end

       
       
      An error occurs because the Mongoid::Association::Relatable#namespace_hierarchy expects the parent class to have a name.
       

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: