Skip to content


DDC-1443: Subscribers reachs maximum nesting level when creating association on pre/postPersist with cascade persist #2070

doctrinebot opened this Issue · 4 comments

2 participants


Jira issue originally created by user @guilhermeblanco:

Suppose a situation where:

A -> B

Where the OneToOne unidirectional association contains cascade persist.

If I decide to save an entity B that should create an A instance, it goes into maximum nesting level no matter if I track prePersist or postPersist.


Comment created by @guilhermeblanco:

Failing test case


Comment created by @guilhermeblanco:

Uploading a new version, now passing successfully, but consuming the onFlush event (which should not be ideal).


Comment created by @beberlei:

Ah yes, this never worked. The transaction stuff will fix that. You have to use scheduleForInsert() something inside prePersist.

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.