[TYPO3-mvc] @dontpersist

Martin Kutschker masi-no at spam-typo3.org
Fri Jul 16 09:25:10 CEST 2010


Am 16.07.2010 00:51, schrieb Felix Oertel:
> 
> 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.

Masi


More information about the TYPO3-project-typo3v4mvc mailing list