Closed rande closed 6 years ago
Mmh, do you see an other way to define an order by in a Doctrine QueryBuilder ?
It seems pager does not work ...
@stephpy it is a possible regression in Doctrine. Can you provide a simple reproducible case to report to the Doctrine's team ?
did anything happen on this? like was it reported to doctrine? any link to that issue?
I've had a load of problems with doctrine 2.5 as it includes some BC breaks. I've hard coded my dependency as follows, which has solved all my issues:
"doctrine/dbal": "2.4.3 as 2.5",
Looks like there was a fix for this merged into doctrine's master branch (https://github.com/doctrine/doctrine2/pull/1377), but I'm still waiting for it to be merged into the 2.5 branch and tagged.
Here's the issue in JIRA: http://www.doctrine-project.org/jira/browse/DDC-3688
it is tagged now in 2.5.1
: https://github.com/doctrine/doctrine2/releases/tag/v2.5.1
Argh... I literally just debugged this and rolled back to 2.4.3 again half an hour ago!
I'm trying to upgrade sonata-project.org, and am using 2.5.5, and still experience the bug reported by @rande
Any news here?
I didn't found time to fix it. If you find a solution, a PR is welcome.
composer.json
"doctrine/orm": "^2.5",
will give me this error:
https://github.com/sonata-project/SonataTimelineBundle/issues/105
if I use doctrine/orm v2.4.8 it is working, but not an option, since I have then other problems with other bundles. Do you have any time to fix this bug?
the link was broken: https://github.com/sonata-project/SonataTimelineBundle/issues/105
@OskarStark thank you!
I did some research and found a solution:
/vendor/stephpy/timeline-bundle/Driver/ORM/TimelineManager.php Line 42
changed
->orderBy('t.createdAt', 'DESC')
to
->orderBy('t.id', 'DESC')
an other possibility would be adding createdAt to the t query.
Look like it is fixed in doctrine/orm 2.6.0
The bundle breaks with the new Doctrine 2.5 release
The query generated by
TimelineManager::getTimeline
fails with Doctrine 2.5 due to a wrong alias. From the following code,ORDER BY t0_.created_at_2 DESC
query should be inside the select:But if you look to the generated query, it seems to be used outside the inner select.