Cloning with

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 5.1.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Cloning a document that has an embedded relationship with a localized field is broken

      class Inner
        include Mongoid::Document
      
        field :name, localize: true
      end
      
      class Outer
        include Mongoid::Document
      
        embeds_many :inners
      end
      
      outer = Outer.new(inners: [name: 'test'])
      copy = outer.clone
      puts copy.inners.first.name
      $> {"en"=>"test"}
      

              Assignee:
              Unassigned
              Reporter:
              eric pigeon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: