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

Also available in: Atom PDF