Bug #29908
@HasLifecycleCallbacks and Doctrine2-Events like @PrePersist don't work.
Status: | Resolved | Start date: | 2011-09-16 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | Persistence | |||
Target version: | TYPO3 Flow Base Distribution - 1.0.0 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
If you activate @HasLifecycleCallbacks in your model and build a @PrePersist function like the following one - it doesn't work (or I'm to stupid to get it work ;)
<?php declare(ENCODING = 'utf-8'); namespace Test\Animals\Domain\Model; /** * @scope prototype * @entity * @HasLifecycleCallbacks */ class AnimalOwner { [...] /** * @PrePersist */ public function beforePersist(){ echo "I don't have a cat."; exit; } }
Or is there something missing in my model code?
Associated revisions
[BUGFIX] Lifecycle annotations were not detected
The detection of Doctrine lifecycle event annotations was broken
since the last Doctrine update (because of the changed return values
of the annotation reader).
Change-Id: I6f2920069ae8c0470cc4626e0d7e9ff4ae33761a
Fixes: #29908
History
#1 Updated by Karsten Dambekalns almost 4 years ago
- Project changed from TYPO3 Flow Base Distribution to TYPO3.Flow
- Status changed from New to Accepted
That should work, so congratulations on probably finding a bug :) I'll check!
#2 Updated by Karsten Dambekalns almost 4 years ago
- Category set to Persistence
- Target version set to 1.0.0
#3 Updated by Mr. Hudson almost 4 years ago
- Status changed from Accepted to Under Review
Patch set 1 of change I6f2920069ae8c0470cc4626e0d7e9ff4ae33761a has been pushed to the review server.
It is available at http://review.typo3.org/5063
#4 Updated by Karsten Dambekalns almost 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 31a934570e6fc2cff811a8ec35bfd423c14d50da.