-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
Paginator with useOutputWalkers=false allows query with joins #1583
Conversation
can this also be merged in 3.x |
@JustDylan23 According to CONTRIBUTING.md#base-branch a base branch for bug fixes should be 4.x |
Will I receive the fix when my version constraint is set to "^3.1"? (of course after I run composer update) I cannot update to a new major of this bundle. I am not familiar with the git workflow that sonata uses to manage its versions. |
This fix is planned to 4.x version, and it is not merged yet. |
@VincentLanglet if I submit a pull request with the same fix targeting 3.x will it be merged or declined? The new paginator was added on 3.x and I would prefer to have this fixed instead of having to target 3.34.1 inside of my composer.json. Is 3.x still eligible for bugfixes? I am on version 3.35.0 of sonata-project/doctrine-orm-admin-bundle This PR fixes the issue I was having related to an output walker breaking when configuring a query in an admin class and selecting a DTO object public function createQuery($context = 'list')
{
$query = parent::createQuery($context);
$alias = $query->getRootAliases()[0];
$query
->select("NEW AppBundle\DTO\Service(
$alias.id,
trans.content,
supplier.name,
GROUP_CONCAT(DISTINCT building.name SEPARATOR ', '),
COUNT(ordr),
SUM(ordr.totalInc))") Eventually this output walker was called. This exception would be triggered: This output walker could not find identifiers since the DTO object does not contain any ORM mapping, or so I concluded. The useOutputWalkers would be called called with false with this pull request and thus resolve my issue. |
You can backport when it gets merged on 4.x |
Thanks |
@JustDylan23 actually you can fix a version in your composer.json like |
Subject
I am targeting this branch, because it fixing the issue.
Closes #1582
Changelog
### Fixed Paginator set useOutputWalkers to false for query with joins