[TYPO3-mvc] Limit the "depht" of object relations

Jan Kornblum jan.kornblum at gmx.de
Thu Jun 27 18:20:32 CEST 2013


Hi Frenck,

thank you very much!

>> Or is my example the "candidate" for "lazy loading"?
>
> Unless you interact with said relations in every single use case, I would say 
> it's worth trying.

Then i will try this.

>> As far is i know this is not yet possible in extbase 1.3, istn't it?
>
> Yes it is. Just add the @lazy annotation to the properties' PHPdoc you want 
> lazy-loaded in the domain object (as documented [1]), if the property is a of 
> objectStorage or domain object type, and extbase takes care of it for you.

Sorry, my mistake...

A last question about "[...] causes Extbase to load the objects and 
build only when they are actually needed [...]": What happens when i 
::var_dump() an object with lazy-annotated childs, are the childs 
"needed" in this case just because the var_dump call (without var_dump 
the code itself wouldn't need them, for example)?

Kind regards, Jan




More information about the TYPO3-project-typo3v4mvc mailing list