Model: injection of object storages
|Priority:||Should have||Due date:|
|TYPO3 Version:||4.6||Has patch:||No|
When using config.tx_extbase.objects to "overload" e.g. Tx_News_Domain_Model_News, the extending class currently needs to take care of the initialization of object storage holding properties inherited from Tx_News_Domain_Model_News.
The reason for this is, that the extending class gets instantiated by Tx_Extbase_Object_Container_Container::getEmptyObject. Therefore the classes constructor isn't called. In the described case this is a problem, because in Tx_News_Domain_Model_News, the initialization of object storage holding properties is done by the constructor.
Injecting these properties instead could solve this. This was a pitfall for me as I didn't expect this behavior.
Updated by Georg Ringer 5 months ago
- Status changed from New to Needs Feedback
do you wanne push a change to git.typo3.org? would be awesome, thanks!