Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1443

Subscribers reachs maximum nesting level when creating association on pre/postPersist with cascade persist

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Git Master
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      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.

      1. DDC1443Test.php
        4 kB
        Guilherme Blanco
      2. DDC1443Test.php
        3 kB
        Guilherme Blanco

        Activity

        Hide
        Guilherme Blanco added a comment -

        Failing test case

        Show
        Guilherme Blanco added a comment - Failing test case
        Hide
        Guilherme Blanco added a comment -

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

        Show
        Guilherme Blanco added a comment - Uploading a new version, now passing successfully, but consuming the onFlush event (which should not be ideal).
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - Ah yes, this never worked. The transaction stuff will fix that. You have to use scheduleForInsert() something inside prePersist.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Guilherme Blanco
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: