Open gigo6000 opened 7 years ago
Yeah this is also sth that happen on Doctrine 2. The only workaround from now is what you said. And I think it'll be hard to fix the problem inside doctrine1 😕
And I think it'll be hard to fix the problem inside doctrine1
not that hard: I've already sent a couple of patch to zikula/doctrine1 on november 2015 (see https://github.com/zikula/doctrine1/pull/7 and https://github.com/zikula/doctrine1/pull/8), I can recreate the PR on LExpress/doctrine1 if you wish
@endelwar I was actually talking about a change in Doctrine to comply with the ONLY_FULL_GROUP_BY restriction, but I guess setting the sql-mode from Doctrine can be another workaround.
A rewrite of all queries that incur in ONLY_FULL_GROUP_BY restriction is a (too big?) big refactor for doctrine1. I ended with using the proposed patch for working around the issue.
I've just submitted PR #29 for setting sql mode
In mysql 5.7 it's required to have the order by fields to be present in the select statement when using DISTINCT. This is because the ONLY_FULL_GROUP_BY setting is turned on by default. I couldn't find where to fix this but it seems to be related to the sfPager or sfDoctrinePager, and I'm sure there are other places in the code this could happen.
Here's part of the trace of error:
As a workaround I added
to the
my.cnf
file and it solves the issue, but I guess that's not a very permanent solution.