[TYPO3-mvc] Edit of @lazy property
Marc Bastian Heinrichs
typo3 at mbh-web.de
Tue Nov 30 23:47:36 CET 2010
Hey Franz,
Am 30.11.10 17:09, schrieb Franz Koch:
> That might also be the issue occuring if you try to use a lazyLoaded
> object as bound object to forms - there you currently lose the identity
> of the object (didn't check the code yet why that happens).
Seems to be in
Tx_Fluid_ViewHelpers_Form_AbstractFormViewHelper::renderHiddenIdentityField()
Don't you wanted to fill up an issue for this? ;-)
> But I don't think we have to change the __toString method. For me it's
> more a question if at this point __toString() should be called at all,
> or better check for a method getIdentifer() and return that instead. A
> method like this would also be needed if you work with foreign objects
> that don't have a uid - so everywhere where we use ->getUid we should
> implement and use ->getIdentifer instead.
> __toString() in my eyes should only be used if you try to use the object
> in a print context, not if you try to resolve a identity.
In case of the SelectViewHelper __toString() is called as a fallback for
$this->persistenceManager->getBackend()->getIdentifierByObject($value)
which fails if $value is an instance of LazyLoadingProxy.
So this could be fixed there [1]
Regards,
Marc Bastian
[1] http://forge.typo3.org/issues/11194
More information about the TYPO3-project-typo3v4mvc
mailing list