mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1707: Lifecycle events not fired #2149
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Mar 15, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user dswindle:
I didn't notice this before, but I have a mapped entity whereby the lifecycle events are not getting fired. Example:
---- entity ----
namespace blah\foo\bar;
/****
/
class BaseUser {
/** @PostLoad **/
public function onPostLoad() {
// do something
}
}
---- entity ----
namespace blah\laa\dee;
/****
*/
class Member extends \blah\foo\bar\BaseUser {
}
---- code ----
$this->getEntityManager()->createQueryBuilder()
->select('m')
->from('blah\laa\dee\Member','m')
->where('m.id=?1 and m.deleted=false and m.canceled=false')
->getQuery()
->setParameter(1, $memberID)
->getSingleResult()
In release 2.1.6 the code above fires the @PostLoad method in BaseUser. In release 2.2.1 the @PostLoad is not fired.
@doctrinebot commented on GitHub (Jul 7, 2012):
Comment created by @beberlei:
Cannot reproduce this, please reopen if problem persists. I added a DDC1707Test.php to master branch that shows it works, i tried this with 2.2 branch aswell.
@doctrinebot commented on GitHub (Jul 7, 2012):
Issue was closed with resolution "Cannot Reproduce"