DDC-194: @PostLoad + proxy creates infinite recursion #2610

Closed
doctrinebot opened this Issue Dec 6, 2009 · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user amirabiri:

The following code snippet causes an infinite loop:

<?php
/****
 * @Entity
 * @Table(name="user")
 * @HasLifecycleCallbacks
 */
class User
{
    /****
     * @Id @Column(type="integer")
     * @GeneratedValue(strategy="AUTO")
     */
    private $id;

    public function foo()
    {
    }

    /****
     * @PostLoad
     */
    public function bar()
    {
    }
}

$user = hyperbeat()->getEntityManager()->getReference('User', 1);
$user->foo();
// Result is:
PHP Fatal error:  Maximum function nesting level of '100' reached, aborting! in ...
stack trace...
@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0-ALPHA4 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment