added named parameter and LifecycleCallbackCascader::getId()
This commit is contained in:
parent
c47cf1de34
commit
17892bb327
@ -296,12 +296,12 @@ FROM
|
|||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
entA.entities AS entB
|
entA.entities AS entB
|
||||||
WHERE
|
WHERE
|
||||||
entA.id = %s
|
entA.id = :entA_id
|
||||||
DQL;
|
DQL;
|
||||||
|
|
||||||
$fetchedA = $this
|
$fetchedA = $this
|
||||||
->_em
|
->_em
|
||||||
->createQuery(sprintf($dql, $entA->getId()))
|
->createQuery($dql)->setParameter('entA_id', $entA->getId())
|
||||||
->getOneOrNullResult();
|
->getOneOrNullResult();
|
||||||
|
|
||||||
$this->assertTrue($fetchedA->postLoadCallbackInvoked);
|
$this->assertTrue($fetchedA->postLoadCallbackInvoked);
|
||||||
@ -496,6 +496,10 @@ class LifecycleCallbackCascader
|
|||||||
$this->postLoadCallbackInvoked = true;
|
$this->postLoadCallbackInvoked = true;
|
||||||
$this->postLoadEntitiesCount = count($this->entities);
|
$this->postLoadEntitiesCount = count($this->entities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getId() {
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @MappedSuperclass @HasLifecycleCallbacks */
|
/** @MappedSuperclass @HasLifecycleCallbacks */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user