Skip to content
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

TranslatableCustomEntityRepository->createDatagridQueryBuilder uses non existant parameter #120

Open
Schwierig opened this issue Nov 24, 2017 · 2 comments

Comments

@Schwierig
Copy link

The createDatagridQueryBuilder() method in the Pim\Bundle\CustomEntityBundle\Entity\Repository\TranslatableCustomEntityRepository class uses the localeCode parameter which is not set in any of the classes functions. If it is on purpose that the user should specify the parameter when extending, there should be at least a comment somewhere stating that.

@jmleroux jmleroux self-assigned this Nov 24, 2017
@jmleroux
Copy link
Contributor

Bug detected here https://github.com/akeneo-labs/CustomEntityBundle/blob/master/Entity/Repository/TranslatableCustomEntityRepository.php#L26

Thank you for pointing, i will take it in charge

@jmleroux jmleroux added the bug label Nov 27, 2017
@jmleroux jmleroux added this to the 2.0.7 milestone Nov 27, 2017
@mmetayer
Copy link
Collaborator

mmetayer commented Feb 14, 2018

Actually, this parameter is automatically appended to the queryBuilder by Pim\Bundle\DataGridBundle\EventListener\AddLocaleCodeToGridListener, see here.
We should definitely add a comment that it must be kept when overriding the Pim\Bundle\CustomEntityBundle\Entity\Repository\TranslatableCustomEntityRepository

@fitn fitn removed this from the 2.0.7 milestone Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants