[TYPO3-mvc] @dontpersist
Steffen Müller
typo3 at t3node.com
Wed Mar 23 16:41:37 CET 2011
Hi.
On 23.03.2011 11:52 Franz Koch wrote:
> I suppose some controller. So
> why doesn't the controller call the locationService and pass the address
> of your model, perform some checks on the returned lat/long and only
> then set them in the model in order to be persisted?
Hmm. In the example, locationService is a domain service and implements
model logic. Why put model logic into the controller?
> so you like to fill the lat/lon properties from within the FE correctly,
> but don't want to persist the calculated values? Why would you wan't
> that? This way you always have to calculate the coordinates over and
> over again.
>
I guess what Nico meant is, that the lat/lon property is only set from
the BE via tcemain (without Extbase) and it is optional to enter a
value. If it is not set, it should be calculated in the FE rendering
process (Extbase) for each request. (right after the object was rebuild
from the repository).
So if I get it right, the property should stay in a transient state as
long as the value is not set in the backend.
@transient does not seem to work here, since the framework then would
never fetch the property value from the repository. Does it?
--
cheers,
Steffen
TYPO3 Blog: http://www.t3node.com/
Twitter: http://twitter.com/t3node
More information about the TYPO3-project-typo3v4mvc
mailing list