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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Incomplete
    • None
    • None
    • None
    • None

    Description

      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.

       

       

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: