Alessandro Siragusa
Alessandro Siragusa
It would be the normal behaviour, it is why we calculate it twice. BTW the `originalData`don't have to be changed by the first changeset calculation
Testing once again my EventListener I found out that if I begin a transaction on the preFlush event and I commit it after the last flush the data is not...
@lsmith77 @dbu @dantleech How can I do if even the transactions don't work properly? I can't understand why all this is not working :/
ouch so we can only solve the main problem...
The problem is that when the preUpdate Event has been fired, the inserts have been already done and the changeset can't be recalculated anymore
Ok, the problem is that is during the preUpdate I create a new Document, this one is not persisted as the inserts have already been done and the operation fails....
One idea may be to insert here https://github.com/doctrine/phpcr-odm/blob/7f9a9efd867928017052b1c1a12d5b159feabe32/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L2051 something like: ``` php $this->fireEvents(); $this->computeChangeSets(); $this->fireEvents(); ``` And remove https://github.com/doctrine/phpcr-odm/blob/7f9a9efd867928017052b1c1a12d5b159feabe32/lib/Doctrine/ODM/PHPCR/UnitOfWork.php#L2323 The second time we fire the events we may not fire...
I think that this will need to wait 1.3, this week and the next one i'll be busy...