[TYPO3-mvc] Extbase 1.3: initializeObject() changed?
Marc Bastian Heinrichs
typo3 at mbh-web.de
Wed Feb 2 20:55:37 CET 2011
Hey,
> This happens when I try to attach on object to an attribute that is beeing
> initialized as Tx_Extbase_Persistence_ObjectStorage. However in many cases
> the attribute remains NULL and the error above is thrown. It seems to me as
> if initializeObject() is not called every time the domain object is being
> created.
When rewriting the object container the contructor calling
initializeObject() was removed from AbstractDomainObject because this
lifecycle method ("initializeObject") is automatically called from
object container now. [1]
When you use the object container to create your domain objects you
should be safe.
BUT I think there is regression, because the property mapper is not
adapted to DI yet and uses "new" to create new domain objects. So
initializeObject is not called then.
I've created an new issue for this. [2]
Best
Marc Bastian
[1]
http://git.typo3.org/TYPO3v4/CoreProjects/MVC/extbase.git?a=commitdiff;h=033fd25048233b3b7f387140eff2223ff9066533#patch2
[2] http://forge.typo3.org/issues/12740
More information about the TYPO3-project-typo3v4mvc
mailing list