Doctrine MongoDB ODM
  1. Doctrine MongoDB ODM
  2. MODM-85

Saving a array over the top of a PersistentCollection results in duplicated data

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0BETA2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mongo 1.6.1, opensky/mongo-odm/master

      Description

      If you take an document that has a referenceMany and overwrite a PersistentCollection of data with an array, even of the same data, the data is appended to the collection instead of replacing it.

        Activity

        Andy Stanberry created issue -
        Hide
        Sebastian Hoitz added a comment -

        Are you using the most recent version of Doctrine MongoDB ODM?

        I'm asking because there was a bug fix for something where all embedded documents were duplicated.

        However I'm also currently investigating a bug where in some cases only one entry does not get removed (although $pullAll is called correctly).

        Show
        Sebastian Hoitz added a comment - Are you using the most recent version of Doctrine MongoDB ODM? I'm asking because there was a bug fix for something where all embedded documents were duplicated. However I'm also currently investigating a bug where in some cases only one entry does not get removed (although $pullAll is called correctly).
        Hide
        Jonathan H. Wage added a comment -

        Bulat, this is the same issue where PersistentCollection is never initialized so thats why the array_diff always appends the data with a $pushAll. Remember we talked about it? we can fix it just need to chat about it for a bit.

        Show
        Jonathan H. Wage added a comment - Bulat, this is the same issue where PersistentCollection is never initialized so thats why the array_diff always appends the data with a $pushAll. Remember we talked about it? we can fix it just need to chat about it for a bit.
        Hide
        Jonathan H. Wage added a comment -

        This is not a problem anymore after the recent refactoring!

        Show
        Jonathan H. Wage added a comment - This is not a problem anymore after the recent refactoring!
        Jonathan H. Wage made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.0.0BETA2 [ 10092 ]
        Resolution Fixed [ 1 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=MODM-85, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Andy Stanberry
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: