Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-688

Original Entity Data gets overridden by the change set

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0-BETA2
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      Mac OS X 10.6; PHP 5.3.2; MySQL 5.1.44

      Description

      When changing data in an entity, the UnitOfWork will call computeChangeSet on a flush event. If there is a changeset, the original data ($this->_originalEntityData) gets overridden by the new data. However, the _originalEntityData should hold the original data, that was present at the time the entity was reconstituted from the database. This does no longer hold now.

      I think this can simply be fixed by commenting this line, however I do not know of any consequences this may bring with it:

      $this->_originalEntityData[$oid] = $actualData; (in computeChangeSet, after if( $changeSet ));

      Anyway, I ran into this problem while trying to retrieve the original data at the onFlush event of an update.

        Activity

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Jasper Kuperus
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: