Skip to content

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Nov 28, 2016

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR api-platform/docs#1234

Sorry about the bad review on my end but if we remove the select part, Doctrine ends up doing joins without selecting the joined tables, and then does lazy join again...

We can remove the partial and add instead $queryBuilder->addSelect($associationAlias); if you don't want to use partial. However, partial does only fetch the wanted data, and IMO it's better than selecting everything (ie SQL query is more readable).

Changes the way ManyToMany are handled as we can't now for sure that the related data exists, even if the joinTables columns are null.

@soyuka soyuka force-pushed the revert-remove-partial-select branch 2 times, most recently from 9be5033 to 2bb9c2d Compare November 29, 2016 08:24
@soyuka soyuka force-pushed the revert-remove-partial-select branch from 2bb9c2d to 57afc29 Compare November 29, 2016 09:06
@soyuka soyuka changed the title (wip) Revert "Remove partial select" Revert "Remove partial select" Nov 29, 2016
@soyuka soyuka added the bug label Nov 29, 2016
@dunglas dunglas changed the base branch from master to 2.0 November 30, 2016 11:05
@dunglas dunglas merged commit 25c6a2d into api-platform:2.0 Nov 30, 2016
@dunglas
Copy link
Member

dunglas commented Nov 30, 2016

Thanks @soyuka

magarzon pushed a commit to magarzon/core that referenced this pull request Feb 12, 2017
@soyuka soyuka deleted the revert-remove-partial-select branch March 30, 2017 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants