Closed alexbudarov closed 8 months ago
See #331
Should also be implemented in Jmix 2.x. A separate issue is required for that.
Changes:
IS_COLLECTION_EMPTY
, MEMBER_OF_COLLECTION
, NOT_MEMBER_OF_COLLECTION
has been added:
<filter id="filter"
dataLoader="universitiesDl">
<properties include=".*"/>
<conditions>
<propertyFilter operation="IS_COLLECTION_EMPTY"
property="faculties"/>
</conditions>
<configurations>
<configuration id="customConfig" name="custom config">
<propertyFilter operation="MEMBER_OF_COLLECTION"
property="faculties"
width="100%"/>
<propertyFilter operation="NOT_MEMBER_OF_COLLECTION"
property="faculties"
width="100%"/>
</configuration>
</configurations>
</filter>
List<University> facultiesWithNoFaculties = dataManager.load(University.class)
.condition(PropertyCondition.isCollectionEmpty("faculties", true))
.list();
distinct
property has been added to LoadContext.Query
and ValueLoadContext.Query
which allows to specify if query result should contain unique items
Currently users need to write custom conditions to be able to filter by sub-properties of one-to-many and many-to-many associations.
It's known that it was also necessary for Thesis.
Such feature makes sense for low-code direction.
example forum request: https://www.cuba-platform.com/discuss/t/filter-criteria-for-onetomany-entity/15105