Document "readonly" state not reset after reload

XMLWordPrintableJSON

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

      I load a document with only or without, then I realize I'll need to persist it, so I reload it. The missing attributes are loaded now, but the document still appears as read-only and cannot be saved.

      Example:

      f = Fund.without(:prices).find('5167f7dc0ea8c8affc0005b2')
      p f.readonly?, f.__selected_fields, f.prices.count
      f.reload
      p f.readonly?, f.__selected_fields, f.prices.count
      

      Output:

      true
      {"prices"=>0}
      0
      true
      {"prices"=>0}
      1010
      

              Assignee:
              Emily Stolfo (Inactive)
              Reporter:
              Marek Stanczyk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: