[TYPO3-mvc] @dontpersist

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Jul 16 16:08:28 CEST 2010


Hey,

>> Performance is the one big thing. If I - in my hole plugin - don't want to persist things, I could
>> save time by ommitting the persistAll() procedure.
>> The other is usability of the model objects. Sometimes I want to do some stuff (like changing the
>> tstamp before outputting or remove some children objects from a property's objectStorage). At the
>> moment I have to clone the model objects for that to prevent the changes to be persisted. This costs
>> additional memory and time as well.
>
> But why use an annotation for that? The use cases you describe look to me like run-time decisions.
>
> Anyway, assuming the framework would fetch you a private copy of the model so a) you can modify it
> independently from other access and b) it won't get persisted, I think the identity map will hold a
> copy of it and will give you a clone.

How would child objects be treated if persistence is deactivated for a 
object? Those would still be in the identity map and thus get persisted 
if altered.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list