[PR #1521] [DDC-2922] Error when new entities are reachable through multiple paths but not all of them are marked cascade-persist #9580

Open
opened 2026-01-22 16:04:45 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/1521

State: closed
Merged: No


Issue first-reported in DDC-2922.

  • Uninteresting test to issue doesn't surface when all entities are new
  • Reproduction test showing error
  • Rough fix for error
  • Analyze why simple-test doesn't repro it

As explained in the test-case, it seems to hinge on the "valid path" stemming a non-new object, so it's important that CmsEmail is flushed before the other things happen. If everything occurs together, the problem doesn't surface.

Note that I've made a small but essential cascade-persist change to CmsEmail in order to show the problem, but this change to the fixtures may or may not be desirable in the long-run.

**Original Pull Request:** https://github.com/doctrine/orm/pull/1521 **State:** closed **Merged:** No --- Issue first-reported in [DDC-2922](http://www.doctrine-project.org/jira/browse/DDC-2922). - [x] Uninteresting test to issue doesn't surface when all entities are new - [x] Reproduction test showing error - [x] Rough fix for error - [x] Analyze why simple-test doesn't repro it As explained in the test-case, it seems to hinge on the "valid path" stemming a non-new object, so it's important that `CmsEmail` is flushed before the other things happen. If everything occurs together, the problem doesn't surface. Note that I've made a small but essential cascade-persist change to `CmsEmail` in order to show the problem, but this change to the fixtures may or may not be desirable in the long-run.
admin added the pull-request label 2026-01-22 16:04:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9580