[DDC-1443] Subscribers reachs maximum nesting level when creating association on pre/postPersist with cascade persist Created: 20/Oct/11  Updated: 29/Oct/11

Status: Open
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: Git Master
Fix Version/s: None
Security Level: All

Type: Bug Priority: Major
Reporter: Guilherme Blanco Assignee: Benjamin Eberlei
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File DDC1443Test.php     File DDC1443Test.php    


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 by Guilherme Blanco [ 20/Oct/11 ]

Failing test case

Comment by Guilherme Blanco [ 20/Oct/11 ]

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

Comment by Benjamin Eberlei [ 29/Oct/11 ]

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

Generated at Wed Apr 01 17:55:13 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.