You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: Before deleting an embedded collection, the original collection shall be backuped.
The script is listening for the onFlush Event.
For Updates this works fine:
foreach ($uow->getScheduledCollectionUpdates() AS $col) {
$col->getSnapshot(); # gives me the original collection -> works as expected
}
However this does not work for Deletions:
foreach ($uow->getScheduledCollectionDeletions() AS $col) {
$col->getSnapshot(); # is allways empty. -> does NOT work as expected
# Also empty (which I consider to be really strange: as OriginalDocumentData is documented as "The original data is the data that was present at the time the document was reconstituted from the database"):
$org = $uow->getOriginalDocumentData( $col->getOwner() );
$mapping = $col->getMapping();
$org[$mapping["fieldName"]]; # empty; but it should have the original collection, which is going to be deleted
}
Any Ideas?
The text was updated successfully, but these errors were encountered:
Scenario: Before deleting an embedded collection, the original collection shall be backuped.
The script is listening for the onFlush Event.
For Updates this works fine:
However this does not work for Deletions:
Any Ideas?
The text was updated successfully, but these errors were encountered: