PropelBundle icon indicating copy to clipboard operation
PropelBundle copied to clipboard

Mysql 5.7 requires order by clause in select DISTINCT statement

Open lionelbzv opened this issue 8 years ago • 0 comments

I'm (always) using Propel1 and got some errors w. MySQL 5.7

seems Doctrine2 had the same problem > https://github.com/doctrine/doctrine2/issues/5622

The problem seems raised when I tried to make an "order by" with a column being in a "join" clause.

        FooQuery::create()
           ->distinct()
            ->joinAnotherTable()
            ->orderBy('AnotherTable.CreatedAt', 'desc')
            ->find($con);

Has anybody experiencing the same issue? I've fixed it by unset the ONLY_FULL_GROUP_BY mode in MySQL, don't know if it could be the job of Propel instead.

Thanks.

lionelbzv avatar Jun 17 '16 15:06 lionelbzv