Project

General

Profile

Actions

Bug #76526

closed

Models passed to controller actions via UID have no lazy loading

Added by Oliver Klee over 8 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2016-06-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

From the Slack channel:

I encountered an issue that when an extbase model is passed into a controller action, it is always fully loaded (including all recursive associations), completely ignoring all "lazy" annotations. This can result in a lot of extra DB queries and thousands of models being created in memory. (My use case that I was displaying a category which had the following 1:n relations: category -> forums -> threads -> posts -> comments.) I think this is a bug. Either validation needs to stop at not-yet-loaded models (because we can assume them to be valid anyway), or @ignorevalidation should completely skip the validation. (Or even better, both.)

getObjectByIdentifier($identifier, $objectType = null, $useLazyLoading = false)
$object = $this->persistenceManager->getObjectByIdentifier($identity, $targetType);
tadaa


Files

Actions #1

Updated by Stefan Froemken over 1 year ago

Hello Olli,

thank you for this information. I remember that issue a long time ago, but can't reproduce it anymore. See picture here in issue ticket. As you can see, the LazyObjectStorage was not initialized anymore. So, for now, the problem is solved.

I will close the ticket now. If you feel this is the wrong decision, let me know, and I will re-open it.

Stefan

Actions

Also available in: Atom PDF