[TYPO3-mvc] Object Accessors & lazy object loading
Frank Mey - NEW.EGO
mey_mailings at newego.de
Fri Apr 8 12:19:58 CEST 2011
Hi,
Franz - problem is solved, my thinking and your comments are right :).
We migrated old data-basis of an IIS/ASP Installation to the extbase/fluid
tables.
The data of uid_local and uid_foreign was switched by the migration script
-> programmers error (not mine luckily ;) ),
so the extension couldn't find any heftbereiche :). I switched it back and
all works fine,
thx for clarification of the topic and lazy loading anyway !
Greetz from munich,
frank
> -----Original Message-----
> From: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-
> project-typo3v4mvc-bounces at lists.typo3.org] On Behalf Of Frank Mey -
> NEW.EGO
> Sent: Friday, April 08, 2011 12:06 PM
> To: 'TYPO3 v4 MVC project'
> Subject: Re: [TYPO3-mvc] Object Accessors & lazy object loading
>
> Hi Franz,
>
> that debug-Thing is obvious to me now, thx :).
>
> Ok, here is the fluid part:
>
> <f:for each="{heft.heftZuArtikel}" as="artikel" >
>
> <h3>{artikel.artikelZuBereich.bereichDescription}</h3>
>
> <f:image
> src="fileadmin/assets/images/Hefte/Inhalt/{artikel.uid}.jpg" width="186m"
> alt="{artikel.Titel" />
>
> <div class="content">
>
> <h6>
> <span>{artikel.artikelTitel}</span>
> </h6>
> </div>
> </f:for>
>
> The {artikel.artikelTitel} works, I think because in the Object-Storage
there is
> only 1 artikel at that time.
> The {artikel.artikelZuBereich.bereichDescription} doesn't work though. I
also
> tried a nested for each over all "artikelZuBereich" , but the result is
empty.
> If I look in the database , I find correct artikel_bereich_mm table with
correct
> relations for each article on that heft :).
>
> Any further ideas ?
>
> > -----Original Message-----
> > From: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-
> > project-typo3v4mvc-bounces at lists.typo3.org] On Behalf Of Franz Koch
> > Sent: Friday, April 08, 2011 10:45 AM
> > To: typo3-project-typo3v4mvc at lists.typo3.org
> > Subject: Re: [TYPO3-mvc] Object Accessors & lazy object loading
> >
> > Hey Frank,
> >
> > > thank you - my explanation wasn't exact then :), I ofc use something
> > > like:
> > >
> > > heft.artikelZuHeft.heftBereichZuArtikel.bereichDescription - so no
> > > get/set there.
> > >
> > > First Relation works, second doesn't - simply empty value, not even
> > > an error.
> >
> > Could you write your exact code please? Is it
> > {heft.artikel.bereich.description} ? As soon as one of those
> > properties in
> the
> > path is a ObjectStorage it won't work (how should FLUID know which
> > object from the storage to use). If not it has to work. Probably check
> > your annotations or try to debug it in your controller.
> >
> > $heft->getArticle()->getBereich()->getUid()
> > ...
> >
> > Are you using MM_match_fields etc. somewhere? Probably for the
> > relation not working?
> >
> > > If I use the f:debug - ViewHelper I get a white screen :S.
> >
> > that might be due to lazy loading, because the
> > lazyLoadingProxies/ObjectStorages have a back reference to the extbase
> > framework and ->debug will then try to debug the whole framework which
> > is a bit too much I guess :)
> >
> > --
> > kind regards,
> > Franz Koch
> > _______________________________________________
> > TYPO3-project-typo3v4mvc mailing list
> > TYPO3-project-typo3v4mvc at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4m
> > vc
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list