[TYPO3-mvc] Object Accessors & lazy object loading

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Apr 7 18:24:09 CEST 2011


Hey Frank,

> B is tied to A via a m:n - Relation and
>
> C is tied to B via a m:n - Relation.
...
> -          As far as I understand, related Objects B and C are loaded
> automatically (no @lazy Comment in any objects).

if you don't need B and C in every view, then probably better add @lazy.

>
> -          I now want to get a property of Object C:
>
> o   Question: my fluid notation {A.<A-to-B
> -Method>.<B-to-C-Method>.<C-PropertyName>} doesn't work, the result is
> empty.
>
> -          I am always calling correctly set get-Methods. The Syntax
> {A.<A-to-B-Method>.<B-Property>} works fine.

you don't have to use the "getPropertyX" names here, but rather just the 
propert name itself.

{objectA.propertyNameWithObjectB.propertyNameWithObjectC.propertyName}

so no "get" and "set" anywhere here - just the name of the 
property/method without "get" (you can't use "set" anyway here).

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list