GroupDataGrid not displaying all rows post-grouping

Hi Jmix Support team,

We have found an issue for the recently added GroupDataGrid component. When we tried to use .groupByKey function to the GroupDataGrid with a DataContainer that contains an entity with CompositeKey, the grid will only show the first row after grouping them.
image
image

From the 2 screenshots above, it is shown that after I group by “currency” in my project, they only show the records under USD, but if I tried and trigger the table to sort by ascending order, it will show the grouped AUD records instead. Which means there are more than one “groups” of records in here but it only shows the first one. Please check on this whether this is a bug from the groupdatagrid-add-on, thank you.

P.S. “currency” is a field on my entity’s CompositeKey

Best Regards,
Wei Jian

Hello!

Could you share a small demo project with the problem or steps to reproduce it? I’ve tried to group by property from composite key but all existing rows are shown.

Hi,

Here is a sample project that shows that the GroupDataGrid is not working on an entity with CompositeKey:

Thank you for the demo project! I’ve created a GitHub issue: GroupDataGrid displays only one group row when entity has Embedded Id · Issue #5002 · jmix-framework/jmix · GitHub

As the workaround, you can add Has UUID trait to your entity.

Thank you @pinyazhin , please try to escalate this fix as soon as possible as there are many of our use cases affected by this bug.

Hi @pinyazhin ,

I encounter similar issue that the entity that has the composite key & grouping using the Transient entity field. I need to click the group data grid icon , it shows another record. Supposedly need to display all the record.
{A870B1C1-85B3-428C-8D67-F8C291C1030E}

{CA261287-F7DE-42E1-9E36-C8A14FDD245B}

Below is my code :

<groupg:groupDataGrid columnReorderingAllowed="true" dataContainer="do08incExpsDc"
                                          id="do08incExpsTable" sortByGroupEnabled="true"  multiSortOnShiftClickOnly="false" >
    <groupg:groupBy>
        <groupg:columnRef key="ssDescr" />
    </groupg:groupBy>
    <groupg:columns resizable="true">
        <groupg:groupColumn header="" key="group"  resizable="true" displayColumnsGrouperOnIconClick="false"   />
        <groupg:column property="ssDescr" />
        <groupg:column property="fldNm"/>
        <groupg:column property="num1"/>
    </groupg:columns>
</groupg:groupDataGrid>

ssDescr is transient in the entity

Hello!

Thank you for sharing the problematic case. We will additionally check it while resolving the issue.

In general, it is highly recommended that entities which do not automatically generate in-memory IDs define the Has Uuid trait. For more information see Entities :: Jmix Documentation