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

Frenck Lutke frenck at innologi.nl
Fri Jun 28 08:18:47 CEST 2013


Hi Jan,

On 27-6-2013 18:20, Jan Kornblum wrote:
> 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)?

Try it out. ;-)

//var_dump($object,$object);
var_dump($object); //any of the lazy proxies contain the real object?
var_dump($object); //anything changed but not shown in the first call?
$object->getLazyAnnotatedObjectStorage()->valid();
var_dump($object); //what about now?


Replace "LazyAnnotatedObjectStorage" with the actual property name, 
assuming it has a same-named get-method. (it should)

HTH,
Frenck


More information about the TYPO3-project-typo3v4mvc mailing list