Skip to content

Disable eager loading when no groups are specified to avoid recursive joins #2002

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Jun 5, 2018

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

@soyuka soyuka force-pushed the fix-eager-loading-without-groups branch from 927c2ec to bae8b67 Compare June 5, 2018 10:33
@@ -107,6 +107,10 @@ private function apply(bool $collection, QueryBuilder $queryBuilder, QueryNameGe
$context += $this->getNormalizationContext($context['resource_class'] ?? $resourceClass, $contextType, $options);
}

if (empty($context[AbstractNormalizer::GROUPS])) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& !isset(AbstractNormalizer::ATTRIBUTES)

@soyuka soyuka force-pushed the fix-eager-loading-without-groups branch from bae8b67 to 000f6df Compare June 5, 2018 12:04
@teohhanhui teohhanhui changed the title Disable eager loading when no groups are specified to avoid recursive… Disable eager loading when no groups are specified to avoid recursive joins Jun 5, 2018
@dunglas dunglas merged commit e6cd60c into api-platform:2.2 Jun 5, 2018
@soyuka soyuka deleted the fix-eager-loading-without-groups branch June 5, 2018 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants