[TYPO3-mvc] Sorting children (object storage) again
Jan Kornblum
jan.kornblum at gmx.de
Thu Aug 1 09:31:29 CEST 2013
Hi group,
as far is i've recently figured out, it is not possible to sort an
objects childrens in an object storage by own criterias (as tca's
default_foreign_sortby is ignored by extbase):
http://forum.typo3.org/index.php/t/198247/
Now how can i built a set of nested objects (Company 1:n Employee 1:n
Notes) "manually" to be able to iterate over all 3 levels in fluid?
As soon as a $companyRepository->findAll() is executed, all the
Employees are already stored in $company->employees and the Notes in
each Employee - but wrong ordered.
So how can i fetch all Companies (without the employee childs!?),
iterate over them and manually attach their childs. And the same for
the third level, for each Employee, find and attach all it's Notes???
Isn't this possible at all, because a soon as the relations are defined
(tca, model), there is now way to fill the related childs manually or
prvent extbase from doing this automatically?
Kind regards, Jan
More information about the TYPO3-project-typo3v4mvc
mailing list