1
0
mirror of synced 2025-03-06 12:56:10 +03:00

added named parameter and LifecycleCallbackCascader::getId()

This commit is contained in:
stoccc 2017-07-21 10:47:32 +02:00 committed by GitHub
parent c47cf1de34
commit 17892bb327

View File

@ -296,12 +296,12 @@ FROM
LEFT JOIN
entA.entities AS entB
WHERE
entA.id = %s
entA.id = :entA_id
DQL;
$fetchedA = $this
->_em
->createQuery(sprintf($dql, $entA->getId()))
->createQuery($dql)->setParameter('entA_id', $entA->getId())
->getOneOrNullResult();
$this->assertTrue($fetchedA->postLoadCallbackInvoked);
@ -496,6 +496,10 @@ class LifecycleCallbackCascader
$this->postLoadCallbackInvoked = true;
$this->postLoadEntitiesCount = count($this->entities);
}
public function getId() {
return $this->id;
}
}
/** @MappedSuperclass @HasLifecycleCallbacks */