OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Installation/Technical Issues or Problems Datagrid/DQL: after update to 2.1 unexpected 'group by' clause in queries.

This topic contains 4 replies, has 2 voices, and was last updated by  Dima Makaruk 6 years, 11 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #35403

    Dima Makaruk
    Participant

    After upgrade to 2.1 version of the oroplatform i have some issues with grids.

    One of them is:
    every field from select clause is being added to group by.
    This happens in Datasource\Orm\QueryConverter\YamlConverter.

    Following query, after being converted to SQL, would have id, name, active fields in the group by clause.

    Is there a reason for such behavior ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #35404

    msulima
    Moderator

    Hi, try your query on last version of mysql. It has parameter sql_mode=only_full_group_by. In that case without parameter in group by clause you will get an error.


    #35405

    Dima Makaruk
    Participant

    Ok, that’s clear.

    If i modify the query like this:

    Adding alias for otm.id to use it in filter.

    The otmId is added to group by. I’ve tried to use

    But then i’ve got no reults at all, when filtering. The query was converted to SQL with errors.

    What was i doing wrong with

    ?

    EDIT:
    I also have a subquery in where clause.
    When i remove the subquery the filters are working.

    #35406

    msulima
    Moderator

    What reason to not use?

    What error you got and what subquery?


    #35407

    Dima Makaruk
    Participant

    Because every field from select is added to group by , i get wrong results and the group_concat makes no sense. I removed the subquery after refactoring the whole query.

Viewing 4 replies - 1 through 4 (of 4 total)

The forum ‘OroPlatform – Installation/Technical Issues or Problems’ is closed to new topics and replies.

Back to top