Uploaded image for project: 'Doctrine MongoDB ODM'
  1. Doctrine MongoDB ODM
  2. MODM-90

UnitOfWork incorrectly flushes certain documents with embedded documents on first flush

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0BETA2
    • Fix Version/s: 1.0.0BETA2
    • Component/s: Hydration, Persister, UnitOfWork
    • Labels:
      None
    • Environment:
      Ubuntu, PHP 5.3.2, Mongo 1.6.3

      Description

      With documents that have embedded documents, the changeset is sometimes calculated incorrectly so that unmodified documents are flushed unnecessarily. This is similar in spirit to #MODM-83, but this isn't covered by that fix.

      This can be seen when the document has an embedded document that uses a discriminator map. When calculating the changeset, the original value will have the discriminator field and value present while the actual value does not contain the discriminator field.

      Covering tests with fixes to follow shortly.

        Activity

        Hide
        weaverryan Ryan Weaver added a comment -
        Show
        weaverryan Ryan Weaver added a comment - The covering test and fix can be found here: http://github.com/weaverryan/mongodb-odm/tree/embedded_document_changeset_problem
        Show
        avalanche123 Bulat Shakirzyanov added a comment - Fixed here - http://github.com/doctrine/mongodb-odm/commit/01e02406f37a316399f4161d00b72efe43716173

          People

          • Assignee:
            jwage Jonathan H. Wage
            Reporter:
            weaverryan Ryan Weaver
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: