[TYPO3-mvc] initializeObject() pointless?

Martin Kutschker masi-no at spam-typo3.org
Thu Jun 10 17:07:10 CEST 2010


I brought the issue up again in the thread "non-db based value objects and embedded values - how to?".

This is what Jochen answered:

"FLOW3 has the concept of custom factories that fits your needs imo.

http://flow3.typo3.org/documentation/manuals/flow3/flow3.objectframework/#id37778491

It would be nice to have this handy feature in Extbase 1.3.0. could you please open a feature
request for this. ATM the place to implement this feature is the DataMapper::createEmptyObject()
method."

Which means that it is not possible right now using official methods. I have created workarounds but
I don't know if they will work for you.

Masi

roberto blanko schrieb:
> Hello,
> 
> I'd like to bring up a problem, which was mentioned by Martin Kutschker
> earlier this year. Unfortunately he didn' get any answers. I've got the very
> same problem right now. Here's the original text from his thread. Help would
> be much appreciated.
> 
> 
> Hi!
>> If you construct a new object or unserialize an object this method is
>> called by default. Unserializing also happens when the object is
>> reconstructed from DB. Unfortunately this happens *before* the properties
>> are thawed. This means that you can only do anything unrelated to the actual
>> values of properties.
>>
>> But why would I need that? What I really need is a reconstituteObject()
>> method called by after thawing.
>>
>> Why do I need this? Because the data mapper maps everything automatically
>> and I cannot use objects as properties unless they are persisted domain
>> objects. Which is in my case not true as I use custom value objects for TCA
>> select items. That is I want to. But I cannot since ExtBase won't let me
>> create the objects and won't create them for me :(
>>
>> Masi
>>


More information about the TYPO3-project-typo3v4mvc mailing list