[TYPO3-mvc] How to get the plain DB value of a relation field?

Martin Kutschker masi-no at spam-typo3.org
Thu Jan 28 10:37:35 CET 2010


Franz Koch schrieb:
> 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.

Later on yesterday in the bath tub I realized that I wouldn't need a getRawFoobar() method, but a
gerFoobarUid() method. Most likely the proxy would have that uid *before* fetching the object data
from the repository.

> 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.

So in your model you don't want the (child) object. You want to access the property solely by the
(external) identifier, ie the uid of the database row. Right?

Masi


More information about the TYPO3-project-typo3v4mvc mailing list