[TYPO3-mvc] How to get the plain DB value of a relation field?
Franz Koch
typo3.RemoveForMessage at elements-net.de
Thu Jan 28 00:48:15 CET 2010
Hi,
> Browsing through the code I stumbled across the possibility to use a custom proxy.
>
> In the model you create two getters. One that accesses the proxy in the standard way, which means
> loading the object. The other getter - eg getRawFoobar() - will ask the proxy for the raw uid. In
> FLUID you can access it as rawFoobar because FLUID cares about methods starting with "get" not about
> real properties.
Isn't that unneeded overhead? If I need persisted objects, i most likely
don't need raw access to the data, and if I need raw access I most
likely don't need it to be persisted.
Another way would be to simply provide the RAW db data in the models and
either implement a magic getter for those or a generic one (
getRawValue($fieldName) ). And those RAW fields then should be used on
converting the object to a array (e.g. for usage via TS).
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list