Hi,
To solve the issue with duplicate entries, you could create a database view that selects the DISTINCT
values directly within the database. This approach allows you to use a “View-Only Entity” in Jmix without needing additional DTOs or pagination logic.
Here’s an example of how the SQL statement could look in a Liquibase script:
<changeSet id="create-distinct-view" author="yourName">
<createView viewName="distinct_values_view" replaceIfExists="true">
SELECT DISTINCT name, authorise
FROM your_table
</createView>
</changeSet>
Once the view is created, you can define a new entity in Jmix, specifically for reading this view. Use @JmixEntity and @Table(name = “distinct_values_view”) and in particular @DbView in the view entity class to refer to the database view. You can find more details in the Jmix documentation on View-Only Entities: Entities :: Jmix Documentation
This should allow you to display only the unique combinations of name and authorise in your screen.
Cheers