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

Custom fields are instantiated on every access, leading to very unexpected behaviours

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Whenever a custom field (demongoized) is accessed, a new object is created - leading to changes not being persisted and performance overhead.

      This closed ticket from 2015 addresses the same issue, but the issue is still unchanged 5 years later: https://jira.mongodb.org/browse/MONGOID-3341

      IMO this is an extremely weird, nearly useless implementation and highly unexpected.

      We're writing our own custom field implementation to work around it, but I believe this should be changed to work like any other document field.

       

       

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            ehud@candivore.io Ehud Rosenberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: