[TYPO3-mvc] Possible misunderstanding of repository / variable scope?
Jan Kornblum
jan.kornblum at gmx.de
Wed Jun 19 19:18:21 CEST 2013
Aaargh, shouldn't have been posted yet, sorry! To hot here...
---
Hi group,
inside the same repository i've got two different methods (A and B) to
retrieve data from it. Both methods first do a $this->findAll(), then
iterate through the objects and set a not database persistable property
in the model object and return the objects.
Now i've placed a plugin twice on a site, each calling a different
controller / action than the other, but both accessing the same
repository. The first plugin gets the data from the repository using
method A, the second plugin gets the data from the repository using
method B.
The strange thing is that the objects that are returned from the
repository in the second plugin (at the part of $this->findAll()) all
have got the not persistable property already set.
As soon as i remove the first plugin from the site, the objects
returned from the method are correct.
How can this be? Do two different methods inside a repository perhaps
access the same "in memory" objects, although inside each method there
is a new assignement like $objects = $this->findAll()?
Hmm, i hope i could explain it undestandable...
Kind regards, jan
More information about the TYPO3-project-typo3v4mvc
mailing list