Setter on hash field failes if the original value is nil.

XMLWordPrintableJSON

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

      Hi there,

      We just upgraded our project from 5.1.4 to 6.0.3 and got some failed tests. One of those is related to hash field setter.

      In MONGOID-3407 (commit @bf84543) There is a change on hash field
      setter, but it fails if the original value is nil.

      Please see my PR (spec only https://github.com/mongodb/mongoid/pull/4399).
      The spec changed in this PR are failing due to that.

      Is this an issue need to fix?

              Assignee:
              Emily Stolfo (Inactive)
              Reporter:
              FENG Zhichao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: