code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| use ... /** * @ORM\Entity(repositoryClass="App\Repository\OrganisationRepository") * @ORM\HasLifecycleCallbacks */ class Organisation { ... /** * @ORM\Embedded(class = "Adress", columnPrefix = false) */ private $adress; ... /** * @ORM\PrePersist * @ORM\PreUpdate */ public function doSomethingA() { echo "<h1>A</h1>"; } } |
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| use ... /** * @ORM\Embeddable * @ORM\HasLifecycleCallbacks */ class Adress { ... /** * @ORM\PrePersist * @ORM\PreUpdate */ public function doSomethingB() { echo "<h1>B</h1>"; } } |
Ik vraag me af of het op een of andere manier mogelijk is om de Lifecycle callbacks in de class van de embedded fields te triggeren?
De doSomethingA wordt in de bovenstaande situatie namelijk wel uitgevoerd, maar de doSomethingB helaas niet.
Is dit op een of andere manier te realiseren?
Currently playing: MTG Arena (PC)